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

Error 500 when open url from Gmail or 365 web client #273

Open
saturit opened this issue Oct 25, 2023 · 3 comments
Open

Error 500 when open url from Gmail or 365 web client #273

saturit opened this issue Oct 25, 2023 · 3 comments

Comments

@saturit
Copy link

saturit commented Oct 25, 2023

I generate a password reset to the @gmail.com email, clicking on the link in the web client, symfony gives me a 500 error. Gmail is probably redirecting it weirdly and this bundle doesn’t like it. Same problem with 365.

Redirect URL example:

https://www.google.com/url?q=https://domain/reset-hesla/reset/rIhoqNYlhS0PRI4TpHnby11P6l2clkG4vgtDnssh&source=gmail&ust=1698306363945000&usg=AOvVaw1FcA7L49YDAoHdwN05C12H

ENV = prod

image

@bocharsky-bw
Copy link
Member

Hm, if it gives you a 500 error - that's probably not the one related to the screenshot you sent. On the screenshot it should be 404 not found error I suppose. Please, double-check your logs to see what exactly 500 error you get. I hope that helps!

@saturit
Copy link
Author

saturit commented Oct 25, 2023

Hi @bocharsky-bw,
in "PROD" env gives an error 500, ib "DEV" env gives an error 404. And yes, this package apparently does not work properly on different environments. The problem occurs with all web clients that use, saferedirect links.

@weaverryan
Copy link
Contributor

Hmm. As Victor mentioned, if you're getting a 500 error, it's not from the line in the screenshot. That line would trigger a 404 error in production as well.

So, first, for that 404, I would add some debug code to see what's going on. The flow should be:

A) User clicks a link that has a token as a query parameter
B) This controller grabs that, saves it to the session, then redirects to the same page without the token query parameter (there is a security reason why this is done).
C) The same controller reads that token from the session.

At some point, something is going wrong.

For the 500 on production, I'm not sure which part of the code is causing that (as I mentioned, it can't be the createNotFoundException() line, which always causes a 404 error). I would try to track down the actual error.

Cheers!

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

3 participants