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 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

This comment has been minimized.

Copy link
Contributor

@rauchy rauchy commented Apr 4, 2019

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

KumanoTanaka added a commit to kumanote/redash that referenced this issue Apr 4, 2019
@arikfr

This comment has been minimized.

Copy link
Member

@arikfr arikfr commented Apr 4, 2019

@rauchy

This comment has been minimized.

Copy link
Contributor

@rauchy rauchy commented Apr 4, 2019

@KumanoTanaka

This comment has been minimized.

Copy link
Contributor Author

@KumanoTanaka 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

This comment has been minimized.

Copy link
Member

@arikfr arikfr commented Apr 4, 2019

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

arikfr added a commit that referenced this issue Apr 4, 2019
@woozhijun

This comment has been minimized.

Copy link

@woozhijun woozhijun commented Apr 25, 2019

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

yoavbls added a commit to yoavbls/redash that referenced this issue Apr 27, 2019
@justinclift

This comment has been minimized.

Copy link
Contributor

@justinclift 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

This comment has been minimized.

Copy link

@kouya0219 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

This comment has been minimized.

Copy link

@fessmage fessmage commented Sep 24, 2019

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

This comment has been minimized.

Copy link
Member

@arikfr 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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
7 participants
You can’t perform that action at this time.