From b4b394bf18628db3210789be355f6c8ef080f039 Mon Sep 17 00:00:00 2001 From: Mathieu Magnin Date: Tue, 21 Nov 2017 10:10:19 +0100 Subject: [PATCH] If user_return_to procedure is invalid then remove it from session --- app/controllers/users/sessions_controller.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/users/sessions_controller.rb b/app/controllers/users/sessions_controller.rb index 63f8212e1..b0c4743de 100644 --- a/app/controllers/users/sessions_controller.rb +++ b/app/controllers/users/sessions_controller.rb @@ -69,6 +69,7 @@ class Users::SessionsController < Sessions::SessionsController private def error_procedure + session["user_return_to"] = nil flash.alert = t('errors.messages.procedure_not_found') redirect_to url_for root_path end