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

Add allow_other_host option to redirect_back method #30850

Merged
merged 1 commit into from Oct 10, 2017

Conversation

Projects
None yet
5 participants
@timsly
Contributor

timsly commented Oct 10, 2017

This PR adds allow_other_host option to redirect_back method
When allow_other_host: false redirection back to URLs from different host is not allowed
allow_other_host is true by default to make it backward compatible

@rails-bot

This comment has been minimized.

Show comment
Hide comment
@rails-bot

rails-bot Oct 10, 2017

Thanks for the pull request, and welcome! The Rails team is excited to review your changes, and you should hear from @sgrif (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

This repository is being automatically checked for code quality issues using Code Climate. You can see results for this analysis in the PR status below. Newly introduced issues should be fixed before a Pull Request is considered ready to review.

Please see the contribution instructions for more information.

rails-bot commented Oct 10, 2017

Thanks for the pull request, and welcome! The Rails team is excited to review your changes, and you should hear from @sgrif (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

This repository is being automatically checked for code quality issues using Code Climate. You can see results for this analysis in the PR status below. Newly introduced issues should be fixed before a Pull Request is considered ready to review.

Please see the contribution instructions for more information.

Show outdated Hide outdated actionpack/lib/action_controller/metal/redirecting.rb
Show outdated Hide outdated actionpack/lib/action_controller/metal/redirecting.rb
@timsly

This comment has been minimized.

Show comment
Hide comment
@timsly

timsly Oct 10, 2017

Contributor

@rafaelfranca Requested changes are in place. Please take a look

Contributor

timsly commented Oct 10, 2017

@rafaelfranca Requested changes are in place. Please take a look

Show outdated Hide outdated actionpack/lib/action_controller/metal/redirecting.rb
@timsly

This comment has been minimized.

Show comment
Hide comment
@timsly

timsly Oct 10, 2017

Contributor

Done. I think we also need to cover bad URL case with tests

Contributor

timsly commented Oct 10, 2017

Done. I think we also need to cover bad URL case with tests

@rafaelfranca rafaelfranca merged commit b205ea2 into rails:master Oct 10, 2017

2 checks passed

codeclimate All good!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@timsly timsly deleted the timsly:safe-redirect-back branch Oct 11, 2017

@bogdanvlviv

This comment has been minimized.

Show comment
Hide comment
@bogdanvlviv

bogdanvlviv Oct 17, 2017

Contributor

@timsly @rafaelfranca I think we need to add changelog entry

Contributor

bogdanvlviv commented Oct 17, 2017

@timsly @rafaelfranca I think we need to add changelog entry

bogdanvlviv added a commit to bogdanvlviv/rails that referenced this pull request Oct 22, 2017

prathamesh-sonpatki added a commit to prathamesh-sonpatki/rails that referenced this pull request Dec 17, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment