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