Bug 31908: Replace an exit by a safe_exit in Auth.pm L1314
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Mon, 14 Nov 2022 11:09:43 +0000 (11:09 +0000)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Wed, 11 Jan 2023 12:07:02 +0000 (12:07 +0000)
No change in user experience. But since we can mock safe_exit,
we can enhance test results.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 7373a1e414ffc74ac17a5c2d4b03b0ee33031cda)

C4/Auth.pm

index 2500ce3..a243f88 100644 (file)
@@ -1279,7 +1279,7 @@ sub checkauth {
             $uri->query_param_delete('password');
             $uri->query_param_delete('koha_login_context');
             print $query->redirect(-uri => $uri->as_string, -cookie => $cookie, -status=>'303 See other');
-            exit;
+            safe_exit;
         }
 
         return ( $userid, $cookie, $sessionID, $flags );