A free open source IT asset/license management system
Fixed RB-20978 - Header may not contain more than a single header, new line detected
snipe356a0d4c1223
diff --git a/app/Helpers/Helper.php b/app/Helpers/Helper.phpindex 407d167b1d..75fcfee5ac 100644--- a/app/Helpers/Helper.php+++ b/app/Helpers/Helper.php@@ -1597,7 +1597,7 @@ class Helper$checkout_to_type = session('checkout_to_type') ?? null;$checkedInFrom = session('checkedInFrom');$other_redirect = session('other_redirect');- $backUrl = session()->pull('url.intended', 'home');+ $backUrl = str_replace(["\r", "\n"], '', session()->pull('url.intended', 'home'));// return to previous pageif ($redirect_option == 'back') {diff --git a/app/Http/Controllers/Auth/SamlController.php b/app/Http/Controllers/Auth/SamlController.phpindex c9a1380dea..1188a12d09 100644--- a/app/Http/Controllers/Auth/SamlController.php+++ b/app/Http/Controllers/Auth/SamlController.php@@ -75,6 +75,7 @@ class SamlController extends Controller{$auth = $this->saml->getAuth();$ssoUrl = $auth->login(session()->get('url.intended'), [], false, false, false, false);+return redirect()->away($ssoUrl);}@@ -95,7 +96,7 @@ class SamlController extends Controller$saml = $this->saml;$auth = $saml->getAuth();$saml_exception = false;- session()->put('url.intended', $request->post('RelayState'));+ session()->put('url.intended', str_replace(["\r", "\n"], '', $request->post('RelayState')));try {$auth->processResponse();} catch (\Exception $e) {