Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FlowAuth admin can't reset existing user's password #1635

Closed
jc-harrison opened this issue Dec 2, 2019 · 3 comments · Fixed by #1644
Closed

FlowAuth admin can't reset existing user's password #1635

jc-harrison opened this issue Dec 2, 2019 · 3 comments · Fixed by #1644
Labels
bug Something isn't working FlowAuth Issues related to FlowAuth

Comments

@jc-harrison
Copy link
Member

Describe the bug

If I log into FlowAuth as an admin user, edit an existing user, and try to reset the user's password, I get re-directed to the login screen and the changes don't take effect (no error message is shown).

To Reproduce

  1. Spin up FlowAuth in demo mode, and log in as 'TEST_ADMIN'.
  2. Select the 'Users' tab, and edit 'TEST_USER'.
  3. In the password box, click the password reset icon.
  4. Select 'Save'.
  5. The login screen appears.
  6. Try logging in as 'TEST_USER' - the password has not changed.

Expected behaviour

Admin users should be able to reset other users' passwords through the FlowAuth UI.

@jc-harrison jc-harrison added bug Something isn't working FlowAuth Issues related to FlowAuth labels Dec 2, 2019
@greenape
Copy link
Member

greenape commented Dec 2, 2019

Presumably there's an error happening on the backend - traceback from the flask app?

@jc-harrison
Copy link
Member Author

[2019-12-02 11:43:49,593] ERROR in app: Exception on /admin/users/1 [PATCH]
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 714, in edit_user
    if len(edits["password"]) > 0:
TypeError: object of type 'bool' has no len()

@jc-harrison
Copy link
Member Author

Looks like

password ? password.length > 0 : undefined,
is causing the problem

jc-harrison added a commit that referenced this issue Dec 2, 2019
@jc-harrison jc-harrison mentioned this issue Dec 3, 2019
8 tasks
@mergify mergify bot closed this as completed in #1644 Dec 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working FlowAuth Issues related to FlowAuth
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants