Merge branch 'master' into develop

This commit is contained in:
Enno Rehling 2019-03-01 19:15:05 +01:00
commit a4b4ba3859
1 changed files with 3 additions and 3 deletions

View File

@ -70,9 +70,9 @@ class EPasswd:
pw = self.get_passwd(id)
if pw[0:4]=='$2a$' or pw[0:4]=='$2y$':
try:
h1 = pw.encode('utf8')
h2 = passwd.encode('utf8')
return bcrypt.checkpw(h1, h2)
uhash = pw.encode('utf8')
upass = passwd.encode('utf8')
return bcrypt.checkpw(upass, uhash)
except:
return False
return pw == passwd