Merge pull request #2033 from vlimant/master

simple overload of passwd_check
This commit is contained in:
Min RK 2017-01-17 12:36:42 +01:00 committed by GitHub
commit 68a514a29d

View File

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