mirror of
https://github.com/jupyter/notebook.git
synced 2025-01-24 12:05:22 +08:00
don't present meaningless username option in notebook
username isn't used for anything other than hash input for authentication, so remove the field in the login form and just use a uuid.
This commit is contained in:
parent
66d5c9f8a6
commit
4f26dae311
@ -18,6 +18,7 @@ Authors:
|
||||
|
||||
import logging
|
||||
import Cookie
|
||||
import uuid
|
||||
|
||||
from tornado import web
|
||||
from tornado import websocket
|
||||
@ -68,7 +69,7 @@ class LoginHandler(AuthenticatedHandler):
|
||||
def post(self):
|
||||
pwd = self.get_argument("password", default=u'')
|
||||
if self.application.password and pwd == self.application.password:
|
||||
self.set_secure_cookie("user", self.get_argument("name", default=u''))
|
||||
self.set_secure_cookie("user", str(uuid.uuid4()))
|
||||
url = self.get_argument("next", default="/")
|
||||
self.redirect(url)
|
||||
|
||||
|
@ -41,7 +41,6 @@ function add_next_to_action(){
|
||||
|
||||
<div id="content_panel">
|
||||
<form action="/login" method="post">
|
||||
Name: <input type="text" name="name" value="{{user_id}}">
|
||||
Password: <input type="password" name="password">
|
||||
<input type="submit" value="Sign in">
|
||||
</form>
|
||||
|
Loading…
Reference in New Issue
Block a user