Preserve parameters during interstitial redirect #2004
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #1934.
This seems to occur in both Rails 7.0 and 7.1:
https://app.honeybadger.io/projects/49963/faults/101591418/01HDEW0GXPZ486GB2K9862T6WT
https://app.honeybadger.io/projects/49963/faults/101723263/01HE0QQMPMVWHHTNX50KW496GQ
As suggested in #1934 it appears this was happening when going through
bounce_request_through_sso
, when the interstitial show ERB was escaping the URL in the script tag. This led to the parameter rewriting behavior. All previous tests passed because none had parameters that would be escaped.As for safety, the only uses of interstitial use internally created
redirect_to
paths. This is my first time dealing with this in rails, if there is a better way, I am happy to hear it.