From 2b970c97e63c2e587b7d78432afb4faeae21da40 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Mon, 20 Oct 2014 13:04:45 +0000 Subject: [PATCH] Bug 13114: Prevent Shibboleth Patches from spamming logs - The shibboleth patch introduced an undefined message into the error logs, when shiboleth is disabled. Testplan 1. Ensure shibboleth is disabled. 2. Refresh any opac page 3. See 'Use of uninitialized value $ENV{"REMOTE_USER"} in string ne at /home/koha/kohaclone/C4/Auth.pm line 711.' popup in the opac-error.log 4. Apply patch 5. Refresh opac page 6. Error should no longer appear --- C4/Auth.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Auth.pm b/C4/Auth.pm index 7dfe3d2..bb2f308 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -708,7 +708,7 @@ sub checkauth { # Finally, after those tests, we can assume (although if it would be better with # a syspref) that if we get a REMOTE_USER, that's from basic authentication, # and we can affect it to $userid. - if ( !$shib and $ENV{'REMOTE_USER'} ne '' and $userid = $ENV{'REMOTE_USER'} ) { + if ( !$shib and defined($ENV{'REMOTE_USER'}) and $ENV{'REMOTE_USER'} ne '' and $userid = $ENV{'REMOTE_USER'} ) { # Using Basic Authentication, no cookies required $cookie = $query->cookie( -- 1.7.10.4