X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/407b61857ea19172b403347469381d814f7e1cb2..34fe4c2ac47e5909ba03ae45132ec3c781129679:/app/controllers/users_controller.rb diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index b90fbea11..23263ebba 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -332,7 +332,10 @@ class UsersController < ApplicationController # omniauth failure callback def auth_failure flash[:error] = t(params[:message], :scope => "users.auth_failure", :default => t("users.auth_failure.unknown_error")) - redirect_to params[:origin] || login_url + + origin = safe_referer(params[:origin]) if params[:origin] + + redirect_to origin || login_url end private