You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have found that calling zxcvbn.measure(password) throws a NumberFormatException for some passwords because len == 0 after the trailing white spaces are trimmed in WipeableString.java. I have no information about the password value which led to this case. But I have tested with string of empty spaces or passwords like 2020 9015 , neither of them threw the exception.
One suggestion is to expose Invalid Argument as part of a declared exception or at least document that this exception can be thrown. Or alternatively swallowing the exception may be a better approach here.
Thanks!
The text was updated successfully, but these errors were encountered:
Hi team,
I have found that calling
zxcvbn.measure(password)
throws aNumberFormatException
for some passwords becauselen == 0
after the trailing white spaces are trimmed inWipeableString.java
. I have no information about the password value which led to this case. But I have tested with string of empty spaces or passwords like2020 9015
, neither of them threw the exception.This is the stacktrace:
One suggestion is to expose Invalid Argument as part of a declared exception or at least document that this exception can be thrown. Or alternatively swallowing the exception may be a better approach here.
Thanks!
The text was updated successfully, but these errors were encountered: