#11080: move notebook to flask/wsgi-based notebook
--------------------------------------------------+-------------------------
   Reporter:  jason                               |          Owner:  jason, 
mpatel, was                                 
       Type:  enhancement                         |         Status:  needs_work 
                                        
   Priority:  blocker                             |      Milestone:  sage-5.0   
                                        
  Component:  notebook                            |       Keywords:  sd31 
sd35.5                                        
Work_issues:                                      |       Upstream:  N/A        
                                        
   Reviewer:  Rado Kirov, Dan Drake, Jason Grout  |         Author:  Mike 
Hansen, Rado Kirov, William Stein, Jason Grout
     Merged:                                      |   Dependencies:  #11078, 
#11874, #12229, #11503, #12327             
--------------------------------------------------+-------------------------
Changes (by ppurka):

  * status:  needs_review => needs_work


Comment:

 Applying this to sage-4.8, I ran into one major problem. And I suggest
 some other minor changes:

 1. There is a leftover file `apply-hg.py` that comes up when running `hg
 status`:
 {{{
 ...ons/sage-4.8/devel/sagenb> hg status
 *** failed to import extension hggit: No module named hggit
 ! util/apply-hg.py
 }}}

 2. It is not possible to login as user or admin. The notebook returns with
 a "Wrong password" message. I tried to look at user_manager to see if the
 problem is there but it isn't there. It's only from the web interface that
 the problem arises. There are two aspects of this: i) I can login with the
 password of a new user once I create a new user and use the randomly
 generated password given by Sage. ii) As soon as I change the randomly
 generated password to my own password using the web interface, I am unable
 to log in anymore.

 3. Using user_manager.py, I can see that the passwords are correctly
 retrieved and verified. So, I am unsure where exactly the problem is. Here
 is an excerpt:
 {{{
 sage: nb = Notebook('/home/punarbasu/tmp/a.sagenb')
 sage: um = nb.user_manager()
 sage: um.valid_login_names()
 ['admin', u'test']
 sage: um.check_password('admin', 'admin')
 True
 sage: um.check_password('test', 'test')
 True
 sage:
 }}}

 4. [Minor change] In `devel/sagenb/sagenb/notebook/run_notebook.py` the
 following two changes should be made:
 {{{
 #!diff
 diff --git a/sagenb/notebook/run_notebook.py
 b/sagenb/notebook/run_notebook.py
 --- a/sagenb/notebook/run_notebook.py
 +++ b/sagenb/notebook/run_notebook.py
 @@ -438,14 +438,14 @@
      print "Please choose a new password for the Sage Notebook 'admin'
 user."
      print "Do _not_ choose a stupid password, since anybody who could
 guess your password"
      print "and connect to your machine could access or delete your
 files."
 -    print "NOTE: Only the md5 hash of the password you type is stored by
 Sage."
 +    print "NOTE: Only the sha256 hash of the password you type is stored
 by Sage."
      print "You can change your password by typing notebook(reset=True)."
      print "\n" * 2
      while True:
          passwd = getpass.getpass("Enter new password: ")
          from sagenb.misc.misc import min_password_length
          if len(passwd) < min_password_length:
 -            print "That password is way too short. Enter a password with
 at least 6 characters."
 +            print "That password is way too short. Enter a password with
 at least %d characters."%min_password_length
              continue
          passwd2 = getpass.getpass("Retype new password: ")
          if passwd != passwd2:
 }}}

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11080#comment:93>
Sage <http://www.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