Bugzilla – Attachment 167079 Details for
Bug 36940
Resolve two Auth warnings when AutoLocation is enabled having a branch without branchip
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36940: Resolve two warnings on undefined branchip
Bug-36940-Resolve-two-warnings-on-undefined-branch.patch (text/plain), 1.53 KB, created by
Marcel de Rooy
on 2024-05-23 08:51:59 UTC
(
hide
)
Description:
Bug 36940: Resolve two warnings on undefined branchip
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2024-05-23 08:51:59 UTC
Size:
1.53 KB
patch
obsolete
>From 80b6c964e710b717f2b539df81753ffcdb345d6a Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Thu, 23 May 2024 08:47:50 +0000 >Subject: [PATCH] Bug 36940: Resolve two warnings on undefined branchip >Content-Type: text/plain; charset=utf-8 > >If you enabled AutoLocation and have a branch without ip, this >triggers warnings. > >Test plan: >Check logs in this situation with/without this patch by logging out >and in again on staff. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > C4/Auth.pm | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/C4/Auth.pm b/C4/Auth.pm >index f9484add7c..b3ee7a1480 100644 >--- a/C4/Auth.pm >+++ b/C4/Auth.pm >@@ -1218,10 +1218,10 @@ sub checkauth { > if ( $type ne 'opac' ) { > if ( C4::Context->preference('AutoLocation') ) { > # we have to check they are coming from the right ip range >- my $domain = $branches->{$branchcode}->{'branchip'}; >+ my $domain = $branches->{$branchcode}->{'branchip'} // q{}; > $domain =~ s|\.\*||g; > $domain =~ s/\s+//g; >- if ( $ip !~ /^$domain/ ) { >+ if ( $domain && $ip !~ /^$domain/ ) { > $cookie = $cookie_mgr->replace_in_list( $cookie, $query->cookie( > -name => 'CGISESSID', > -value => '', >-- >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 36940
:
167079
|
167274