Skip to content

Commit 7161670

Browse files
committed
Explicitly allow redirects to other hosts
1 parent 69df2a3 commit 7161670

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/controllers/articles_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def redirect
9898
r = Redirect.find_by!(from_path: from)
9999
# TODO: If linked to article, directly redirect to the article.
100100
# Let redirection made outside of the blog on purpose (deal with it, Brakeman!)
101-
redirect_to r.full_to_path, status: :moved_permanently if r
101+
redirect_to r.full_to_path, allow_other_host: true, status: :moved_permanently if r
102102
end
103103

104104
def archives

0 commit comments

Comments
 (0)