-
Notifications
You must be signed in to change notification settings - Fork 138
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
Security issue with only generating link using only signed user pk #32
base: master
Are you sure you want to change the base?
Conversation
… with permanent link exposed to gain access
As mentioned in #31 shall leave the docs failure to you - thanks! |
Using the password hash is fine even is the password is set to the previous one -- the password salt changes which invalidates old URLs. What we could do is generate URLs in the form |
Great idea on using the Interested in the rational in wanting to expose the |
We need to expose |
Ah, I see. I guess you were talking about for the url generated should be:
while i meant to say
both of with we can extract the user-id (and so does the attacker, if he really want to know the user-id that much, he can break HMAC via controlled plain text attack) Though I have a slight preference to 2 since it does raise the barrier for exposing information. |
Note this is only a mitigation fix
Scenario
If we only generate the reset link using expiry link and max age, with in the expiry period, anybody with view of the reset link can gain access to the user account.
e.g. if I have access to the browser history since it is a public computer within the expiry period, i can access the reset link and gain access to the account.
I have proposed an example fix with signing with also the password hash. However this fix is just a mitigation. If user reset password with the same password, then this will still be an issue.
Safety in signing the password
Also note that we have hashed the password to be signed, in case if user didnt encrypt their password to prevent accidental leakage.
Help
Do you have any suggestions for a better fix?