mirror of
https://github.com/redmine/redmine.git
synced 2025-11-01 19:05:51 +01:00
Fixed that back_url=/ param is ignored (#16467).
git-svn-id: http://svn.redmine.org/redmine/trunk@13040 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -379,7 +379,7 @@ class ApplicationController < ActionController::Base
|
||||
begin
|
||||
uri = URI.parse(back_url)
|
||||
# do not redirect user to another host or to the login or register page
|
||||
if ((uri.relative? && back_url.match(%r{\A/\w})) || (uri.host == request.host)) && !uri.path.match(%r{/(login|account/register)})
|
||||
if ((uri.relative? && back_url.match(%r{\A/(\w.*)?\z})) || (uri.host == request.host)) && !uri.path.match(%r{/(login|account/register)})
|
||||
redirect_to(back_url)
|
||||
return
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user