restrict ToS url redirect to local urls; see #1813
This commit is contained in:
@@ -4,7 +4,8 @@ class StaticController < ApplicationController
|
|||||||
|
|
||||||
def accept_terms_of_service
|
def accept_terms_of_service
|
||||||
cookies.permanent[:accepted_tos] = "1"
|
cookies.permanent[:accepted_tos] = "1"
|
||||||
redirect_to(params[:url] || posts_path)
|
url = params[:url] if params[:url].start_with? '/'
|
||||||
|
redirect_to(url || posts_path)
|
||||||
end
|
end
|
||||||
|
|
||||||
def error
|
def error
|
||||||
|
|||||||
Reference in New Issue
Block a user