Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upPrevent Referer leaking on password reset page #11907
Comments
|
Can I work on this? |
|
@Kacppian Sure! |
|
Hey, I have some doubts. Couldn't find a place to ask questions. I tried irc #sentry but couldn't find anyone to talk to or maybe I'm bad at using my irc client. Can you please help me? On |
|
My idea of solving this was to use |
The Your plan of setting into the session and redirecting sounds like a good plan to me. |
|
Hello. I think to resolve this problem sentry server just need provide header |
|
I'd be happy to take a crack at this for Hacktoberfest! |
Add `Referrer-Policy` header with `strict-origin-when-cross-origin` value to responses on views with password reset hash. Requests to third-party services on password reset page won't contain path with `hash` in referrer header Fixes getsentryGH-11907


Right now when you get a password reset link, the page you end up on contains the reset token in the url.
Doing this causes a problem in which any page redirected to after this, and especially any third party assets being loaded leak this reset token via the
Refererheader on the request.While this isn't specifically a problem since the only things we embed are trusted vendors, in the case of SaaS, it's better to just avoid it.
My proposal is to keep the same url, but this endpoint does the following:
Doing this mitigates any ability for leaking data through any Referer header in the future.
I am open to other proposals, but this is the best that comes to my mind.