Skip to content

Allow relative redirects when raise_on_open_redirects is enabled #44650

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

Merged
merged 1 commit into from
Mar 10, 2022

Conversation

tomhughes
Copy link
Contributor

Summary

Redirecting to a URL generated with only_path: true should be allowed when open redirect protection is enabled because a relative URL with no host refers to the same host.

@rails-bot rails-bot bot added the actionpack label Mar 10, 2022
@tenderlove tenderlove merged commit 1bca3cc into rails:main Mar 10, 2022
@tomhughes tomhughes deleted the relative-redirect branch March 10, 2022 17:33
rafaelfranca pushed a commit that referenced this pull request Mar 14, 2022
Allow relative redirects when `raise_on_open_redirects` is enabled
brucebolt added a commit to alphagov/signon that referenced this pull request Apr 13, 2022
Rails 7.0.2.3 has a bug where `redirect_back_or_to` (the replacement for
`redirect_back`) does not work for relative URLs.

This has been resolved in rails/rails#44650 but
has not yet been included in a release of Rails.

Therefore creating our own workaround, which can be removed once Rails
is upgraded to a version containing this fix.
brucebolt added a commit to alphagov/signon that referenced this pull request Apr 13, 2022
Rails 7.0.2.3 has a bug where `redirect_back_or_to` (the replacement for
`redirect_back`) does not work for relative URLs.

This has been resolved in rails/rails#44650 but
has not yet been included in a release of Rails.

Therefore creating our own workaround, which can be removed once Rails
is upgraded to a version containing this fix.
brucebolt added a commit to alphagov/signon that referenced this pull request Apr 13, 2022
Rails 7.0.2.3 has a bug where `redirect_back_or_to` (the replacement for
`redirect_back`) does not work for relative URLs.

This has been resolved in rails/rails#44650 but
has not yet been included in a release of Rails.

Therefore creating our own workaround, which can be removed once Rails
is upgraded to a version containing this fix.
brucebolt added a commit to alphagov/signon that referenced this pull request Apr 13, 2022
Rails 7.0.2.3 has a bug where `redirect_back_or_to` (the replacement for
`redirect_back`) does not work for relative URLs.

This has been resolved in rails/rails#44650 but
has not yet been included in a release of Rails.

Therefore creating our own workaround, which can be removed once Rails
is upgraded to a version containing this fix.
brucebolt added a commit to alphagov/signon that referenced this pull request Apr 13, 2022
Rails 7.0.2.3 has a bug where `redirect_back_or_to` (the replacement for
`redirect_back`) does not work for relative URLs.

This has been resolved in rails/rails#44650 but
has not yet been included in a release of Rails.

Therefore creating our own workaround, which can be removed once Rails
is upgraded to a version containing this fix.
brucebolt added a commit to alphagov/signon that referenced this pull request Apr 14, 2022
Rails 7.0.2.3 has a bug where `redirect_back_or_to` (the replacement for
`redirect_back`) does not work for relative URLs.

This has been resolved in rails/rails#44650 but
has not yet been included in a release of Rails.

Therefore creating our own workaround, which can be removed once Rails
is upgraded to a version containing this fix.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants