ignore unknown ascii symbols with password check. to be rewritten
This commit is contained in:
parent
9aeb412ca0
commit
80475657bd
1 changed files with 2 additions and 2 deletions
|
@ -95,8 +95,8 @@ def validate(clientemail, password):
|
|||
|
||||
#2. check the password
|
||||
encpass = clientsdb[c_id]['encpasswd']
|
||||
b_srvpass = password.encode('ascii')
|
||||
b_encpass = encpass.encode('ascii')
|
||||
b_srvpass = password.encode('ascii', 'ignore')
|
||||
b_encpass = encpass.encode('ascii', 'ignore')
|
||||
|
||||
if (hmac.compare_digest(bcrypt.hashpw(b_srvpass, b_encpass), b_encpass)):
|
||||
#login successful
|
||||
|
|
Loading…
Reference in a new issue