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:
MinRK 2011-09-06 16:24:19 -07:00
parent 66d5c9f8a6
commit 4f26dae311
2 changed files with 2 additions and 2 deletions

View File

@ -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)

View File

@ -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>