mirror of
https://github.com/postgres/pgweb.git
synced 2025-08-13 13:12:42 +00:00
Fix password type identifications
Sha1's start with sha1$, not sha1_ (and this is not a SQL LIKE match). And fix parameters when calling re.match in the unmatched case.
This commit is contained in:
@ -80,9 +80,9 @@ class PGUserChangeForm(UserChangeForm):
|
||||
return "OAuth integrated"
|
||||
elif obj.password.startswith('pbkdf2_'):
|
||||
return "Regular password"
|
||||
elif obj.password.startswith('sha1_'):
|
||||
elif obj.password.startswith('sha1$'):
|
||||
return "Old SHA1 password"
|
||||
elif re.match('^[a-z0-9]{64}'):
|
||||
elif re.match('^[a-z0-9]{64}', obj.password):
|
||||
return "Old unknown hash"
|
||||
else:
|
||||
return "Unknown"
|
||||
|
Reference in New Issue
Block a user