diff --git a/app/controllers/session_controller.rb b/app/controllers/session_controller.rb index b14cdf9798e..e0344c3cc6a 100644 --- a/app/controllers/session_controller.rb +++ b/app/controllers/session_controller.rb @@ -14,7 +14,8 @@ class SessionController < ApplicationController return_path = if params[:return_path] params[:return_path] elsif session[:destination_url] - URI::parse(session[:destination_url]).path + uri = URI::parse(session[:destination_url]) + "#{uri.path}#{uri.query ? "?" << uri.query : ""}" else path('/') end