[openstreetmap/openstreetmap-website] Fix: Preserve OAuth referer when resending confirmation email (PR #6714)
Tom Hughes
notifications at github.com
Sun Jan 25 19:22:29 UTC 2026
tomhughes left a comment (openstreetmap/openstreetmap-website#6714)
So this needs to delete `:referer` from the session in all the places that currently delete `:pending_user` from the session, or it will stay around forever.
I'm also not sure about the way the tests are written - they seem to be testing more than is probably necessary and they look more like integration or system tests than controller tests at the moment but I think that may mean they're doing more than they need to rather than that they should be moved.
The first test is probably redundant - we already have tests further up that check that the referer is preserved normally I think and OAuth is not special, it's just another example of a referer. It's also not truly following through each stop as demonstrated by the fact that at the end it just makes up the referer URL for the final confirm rather than extracting it from the email.
The second test is mostly modelled on the first one but oddly stops sooner without running the final test that the confirm redirects as expected.
The critical thing that should be tested is the thing that's being fixed here - that if you visit the signup page with a referer and then visit the resend confirmation page that the subsequent email preserves the referer and that visiting the confirmation link from the email redirects to the expected referer from the original signup.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6714#issuecomment-3797122166
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/6714/c3797122166 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20260125/7c3c0423/attachment.htm>
More information about the rails-dev
mailing list