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
Describe the bug
FlowAuth admin add_user fails with the following exception when json["password"] is an empty string:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 2446, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1951, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1820, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.6/site-packages/flask/_compat.py", line 39, in reraise
raise value
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1949, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1935, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/usr/local/lib/python3.6/site-packages/flask_login/utils.py", line 261, in decorated_view
return func(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/flask_principal.py", line 199, in _decorated
rv = f(*args, **kw)
File "/usr/local/lib/python3.6/site-packages/flowauth/admin.py", line 639, in add_user
if zxcvbn(json["password"])["score"] > 3:
File "/usr/local/lib/python3.6/site-packages/zxcvbn/__init__.py", line 28, in zxcvbn
result = scoring.most_guessable_match_sequence(password, matches)
File "/usr/local/lib/python3.6/site-packages/zxcvbn/scoring.py", line 204, in most_guessable_match_sequence
optimal_match_sequence = unwind(n)
File "/usr/local/lib/python3.6/site-packages/zxcvbn/scoring.py", line 181, in unwind
for candidate_l, candidate_g in optimal['g'][k].items():
IndexError: list index out of range
Expected behaviour here should be to raise
InvalidUsage(
"Password not long enough.", payload={"bad_field": "password"}
)
or similar.
The text was updated successfully, but these errors were encountered:
Describe the bug
FlowAuth admin
add_user
fails with the following exception whenjson["password"]
is an empty string:Expected behaviour here should be to raise
or similar.
The text was updated successfully, but these errors were encountered: