mirror of
https://github.com/jupyter/notebook.git
synced 2025-01-24 12:05:22 +08:00
Merge pull request #2033 from vlimant/master
simple overload of passwd_check
This commit is contained in:
commit
68a514a29d
@ -67,10 +67,13 @@ class LoginHandler(IPythonHandler):
|
||||
def hashed_password(self):
|
||||
return self.password_from_settings(self.settings)
|
||||
|
||||
def passwd_check(self, a, b):
|
||||
return passwd_check(a, b)
|
||||
|
||||
def post(self):
|
||||
typed_password = self.get_argument('password', default=u'')
|
||||
if self.get_login_available(self.settings):
|
||||
if passwd_check(self.hashed_password, typed_password):
|
||||
if self.passwd_check(self.hashed_password, typed_password):
|
||||
self.set_login_cookie(self, uuid.uuid4().hex)
|
||||
elif self.token and self.token == typed_password:
|
||||
self.set_login_cookie(self, uuid.uuid4().hex)
|
||||
|
Loading…
Reference in New Issue
Block a user