Skip to content

Commit

Permalink
Fixes #36768: Prevent redirection to other hosts via HTTP referer header
Browse files Browse the repository at this point in the history
  • Loading branch information
ehelms committed Sep 21, 2023
1 parent 57a8f55 commit 84d990c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ def process_ajax_error(exception, action = nil)
end

def redirect_back_or_to(url)
redirect_back(fallback_location: url)
redirect_back(fallback_location: url, allow_other_host: false)
end

def saved_redirect_url_or(default)
Expand Down

0 comments on commit 84d990c

Please sign in to comment.