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

need to add optional params to render_token_login_page on reset_password? #3675

Closed
KumanoTanaka opened this issue Apr 4, 2019 · 10 comments
Closed

Comments

@KumanoTanaka
Copy link
Contributor

KumanoTanaka commented Apr 4, 2019

https://github.com/getredash/redash/blob/master/redash/handlers/authentication.py#L85

@routes.route(org_scoped_rule('/reset/<token>'), methods=['GET', 'POST'])
def reset(token, org_slug=None):
    return render_token_login_page("reset.html", org_slug, token)

☝️ should be the following?

@routes.route(org_scoped_rule('/reset/<token>'), methods=['GET', 'POST'])
def reset(token, org_slug=None):
    return render_token_login_page("reset.html", org_slug, token, False)

In our stand-alone env, we could not reset some user's password.
redash docker tag was: redash/redash:7.0.0.b18042

@rauchy
Copy link
Contributor

rauchy commented Apr 4, 2019

@KumanoTanaka that seems right. Could you submit a PR for this?

@arikfr
Copy link
Member

arikfr commented Apr 4, 2019 via email

@rauchy
Copy link
Contributor

rauchy commented Apr 4, 2019

@arikfr I'm guessing it will error for pending users. see https://github.com/getredash/redash/blob/master/redash/handlers/authentication.py#L41

@KumanoTanaka
Copy link
Contributor Author

KumanoTanaka commented Apr 4, 2019

What’s the implication of this? I mean what was the behavior before the change?

I could not reset user's password when I clicked email-embedded link.
always faced redash error page.

This invitation has already been accepted. 
Please try resetting your password instead.

@arikfr
Copy link
Member

arikfr commented Apr 4, 2019

@rauchy oh, ok. I guess this was missing from #3500?

@woozhijun
Copy link

I have the same problem for redash/redash:7.0.0.b18042

@justinclift
Copy link
Member

justinclift commented May 25, 2019

Just hit this exact error when trying to reset a test user's password in a newly installed temporary instance, running Redash 7.0.0 b18042.

The Admin user can generate the "reset password" link, but when going to the generated link it turns out to be incorrect:

This invitation has already been accepted. 
Please try resetting your password instead.

So, resetting passwords via the webUI doesn't work.

The workaround was to connect directly to the running backend PostgreSQL database and replace the password_hash value for the user (in the users table) with the hash for the new password.

# docker exec -it redash_postgres_1 sh
# su - postgres
$ psql postgres
postgres=# SELECT id, name, email, password_hash FROM users;

With the query to update the value:

UPDATE users
SET password_hash = 'new_hash_value'
WHERE email = 'email_address@of_user.here';

Logging in with the updated user/password combination then worked fine.

@kouya0219
Copy link

kouya0219 commented Sep 6, 2019

The easiest way
change details in the users table

{"is_invitation_pending": false, "active_at": "2019-09-04T08:53:56Z"}
to
{"active_at": "2019-09-04T08:53:56Z"}

and then click Send Password Reset Email or I forgot my password link

@fessmage
Copy link

Same problem on Version: 7.0.0+b18042 (4a978ba): reset password don't work, link from email result in page "This invitation has already been accepted".

@arikfr
Copy link
Member

arikfr commented Sep 24, 2019

Closing this as it was already fixed in #3676. The fix is included in v8.0.0-beta.2 and I recommend upgrading to it to fix it (don't be worried about the beta tag, it was in use for along time now).

@arikfr arikfr closed this as completed Sep 24, 2019
harveyrendell pushed a commit to pushpay/redash that referenced this issue Nov 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants