#6251: LogoutResource in sage/server/simple/twist.py doesn't really log you out
----------------------+-----------------------------------------------------
 Reporter:  ddrake    |       Owner:  boothby             
     Type:  defect    |      Status:  new                 
 Priority:  major     |   Milestone:  sage-4.0.2          
Component:  notebook  |    Keywords:  simple server logout
 Reviewer:            |      Author:                      
   Merged:            |  
----------------------+-----------------------------------------------------
 I'm using the simple server, and it seems like the logout command doesn't
 really log you out. From a regular Python (2.6) session:
 {{{
 >>> import urllib
 >>> def get_url(url): h = urllib.urlopen(url); data = h.read(); h.close();
 return data
 ...
 >>>
 
print(get_url('http://localhost:8000/simple/login?username=admin&password=xxx'))
 {
 "session": "515f64ef06471627e1d4a903ee921899"
 }
 ___S_A_G_E___

 >>> sess = "515f64ef06471627e1d4a903ee921899"
 >>>
 
print(get_url('http://localhost:8000/simple/compute?session={0}&code=2*2'.format(sess)))
 {
 "status": "done",
 "files": [],
 "cell_id": 1
 }
 ___S_A_G_E___

 4

 >>>
 print(get_url('http://localhost:8000/simple/logout?session={0}'.format(sess)))
 {
 "session": "515f64ef06471627e1d4a903ee921899"
 }
 ___S_A_G_E___

 }}}

 But you can still issue compute commands and have them evaluated. In the
 same Python session:
 {{{
 >>>
 
print(get_url('http://localhost:8000/simple/compute?session={0}&code=3*3'.format(sess)))
 {
 "status": "done",
 "files": [],
 "cell_id": 3
 }
 ___S_A_G_E___

 9

 }}}
 In the LogoutResource class of twist.py, I see that we quit the worksheet
 and remove all the cells, but it's retaining some state -- note above that
 after we logout, the next compute command uses  cell 3. You never
 explicitly remove "session" from the sessions dictionary; is that
 something that should be done?

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/6251>
Sage <http://sagemath.org/>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to