From cb66eb12930d9ef1cf0fa3f2fed7ef335cef6a26 Mon Sep 17 00:00:00 2001 From: Pete Matsyburka Date: Fri, 31 Oct 2025 10:10:19 +0200 Subject: [PATCH] fix redirect --- app/controllers/console_redirect_controller.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/controllers/console_redirect_controller.rb b/app/controllers/console_redirect_controller.rb index dd80e9fe..0da093a8 100644 --- a/app/controllers/console_redirect_controller.rb +++ b/app/controllers/console_redirect_controller.rb @@ -17,8 +17,10 @@ class ConsoleRedirectController < ApplicationController scope: :console, exp: 1.minute.from_now.to_i) - path = Addressable::URI.parse(params[:redir]).path if params[:redir].to_s.starts_with?(Docuseal::CONSOLE_URL) + redir_uri = Addressable::URI.parse(params[:redir]) + path = redir_uri.path if params[:redir].to_s.starts_with?(Docuseal::CONSOLE_URL) - redirect_to("#{Docuseal::CONSOLE_URL}#{path}?#{{ auth: }.to_query}", allow_other_host: true) + redirect_to "#{Docuseal::CONSOLE_URL}#{path}?#{{ **redir_uri.query_values, 'auth' => auth }.to_query}", + allow_other_host: true end end