Verify referer before adding to session
What does this MR do and why?
Fixes https://gitlab.com/gitlab-org/modelops/anti-abuse/team-tasks/-/issues/725
When performing identity verification we save the referer in the session so we can re-direct the user back to where they came from once identity verification is complete. There are some scenarios where the referer could be the identity verification page which would result in the user ultimately getting re-directed to the root path upon completion of identity verification. This MR adds a check to ensure we only set the session variable if the referer is not the identity verification path.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.