Bugzilla – Attachment 140690 Details for
Bug 29744
Harmonize psgi/plack detection methods
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29744: Remove unnecessary condition in C4::Auth::safe_exit
Bug-29744-Remove-unnecessary-condition-in-C4Authsa.patch (text/plain), 1.15 KB, created by
Marcel de Rooy
on 2022-09-16 07:54:01 UTC
(
hide
)
Description:
Bug 29744: Remove unnecessary condition in C4::Auth::safe_exit
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2022-09-16 07:54:01 UTC
Size:
1.15 KB
patch
obsolete
>From 52e44916d353b66a06868f531be5a64685452ba6 Mon Sep 17 00:00:00 2001 >From: David Cook <dcook@prosentient.com.au> >Date: Wed, 20 Apr 2022 05:27:32 +0000 >Subject: [PATCH] Bug 29744: Remove unnecessary condition in > C4::Auth::safe_exit >Content-Type: text/plain; charset=utf-8 > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >[EDIT] Adding David's comments from Bugzilla to safe_exit here. >--- > C4/Auth.pm | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > >diff --git a/C4/Auth.pm b/C4/Auth.pm >index fae37b97dc..d194d41de9 100644 >--- a/C4/Auth.pm >+++ b/C4/Auth.pm >@@ -56,9 +56,11 @@ use Koha::CookieManager; > use vars qw($ldap $cas $caslogout); > our (@ISA, @EXPORT_OK); > >+#NOTE: The utility of keeping the safe_exit function is that it can be easily re-defined in unit tests and plugins > sub safe_exit { >- if (C4::Context::psgi_env) { die 'psgi:exit' } >- else { exit } >+ # It's fine for us to "exit" because CGI::Compile (used in Plack::App::WrapCGI) redefines "exit" for us automatically. >+ # Since we only seem to use C4::Auth::safe_exit in a CGI context, we don't actually need PSGI detection at all here. >+ exit; > } > > >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 29744
:
132299
|
132975
|
133429
|
133430
|
140689
| 140690 |
140691
|
140692
|
140922