@@ -127,8 +127,8 class ApplicationController < ActionController::Base | |||||
127 | back_url = CGI.unescape(params[:back_url].to_s) |
|
127 | back_url = CGI.unescape(params[:back_url].to_s) | |
128 | if !back_url.blank? |
|
128 | if !back_url.blank? | |
129 | uri = URI.parse(back_url) |
|
129 | uri = URI.parse(back_url) | |
130 | # do not redirect user to another host |
|
130 | # do not redirect user to another host or to the login or register page | |
131 | if uri.relative? || (uri.host == request.host) |
|
131 | if (uri.relative? || (uri.host == request.host)) && !uri.path.match(%r{/(login|account/register)}) | |
132 | redirect_to(back_url) and return |
|
132 | redirect_to(back_url) and return | |
133 | end |
|
133 | end | |
134 | end |
|
134 | end |
General Comments 0
You need to be logged in to leave comments.
Login now