[Koha-bugs] [Bug 11077] Correct silent warnings in C4/Auth.pm

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Oct 24 20:42:04 CEST 2013


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11077

M. Tompsett <mtompset at hotmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Signed Off                  |ASSIGNED

--- Comment #12 from M. Tompsett <mtompset at hotmail.com> ---
I did the following testing to see what the current behaviour is and what the
modified behaviour is:
1) I restored a database from 3 months ago.
2) echo > koha-error_log
3) echo > koha-opac-error_log
4) echo > koha-zebradaemon.err
5) ran the staff client upgrade process.
6) logged in.
7) logged out.
8) deleted the AllowPKIAuth system preference.
9) echo > koha-error_log
10) echo > koha-opac-error_log
11) echo > koha-zebradaemon.err
12) clicked the login in button with nothing.

(I chose this case, because between valid, invalid, username only, password
only, and completely blank, the completely blank is easiest to test and show
the difference)

[Thu Oct 24 14:30:42 2013] [error] [client 192.168.45.23] [Thu Oct 24 14:30:42
2013] mainpage.pl: Use of uninitialized value in string ne at
/home/mtompset/kohaclone/C4/Auth.pm line 685., referer:
http://demo.library-admin.kohasystem.ca/cgi-bin/koha/mainpage.pl?logout.x=1
[Thu Oct 24 14:30:42 2013] [error] [client 192.168.45.23] [Thu Oct 24 14:30:42
2013] mainpage.pl: Use of uninitialized value $pki_field in string ne at
/home/mtompset/kohaclone/C4/Auth.pm line 758., referer:
http://demo.library-admin.kohasystem.ca/cgi-bin/koha/mainpage.pl?logout.x=1
[Thu Oct 24 14:30:42 2013] [error] [client 192.168.45.23] [Thu Oct 24 14:30:42
2013] mainpage.pl: Use of uninitialized value $pki_field in string eq at
/home/mtompset/kohaclone/C4/Auth.pm line 795., referer:
http://demo.library-admin.kohasystem.ca/cgi-bin/koha/mainpage.pl?logout.x=1
[Thu Oct 24 14:30:42 2013] [error] [client 192.168.45.23] [Thu Oct 24 14:30:42
2013] mainpage.pl: Use of uninitialized value $pki_field in string eq at
/home/mtompset/kohaclone/C4/Auth.pm line 795., referer:
http://demo.library-admin.kohasystem.ca/cgi-bin/koha/mainpage.pl?logout.x=1
[Thu Oct 24 14:30:42 2013] [error] [client 192.168.45.23] [Thu Oct 24 14:30:42
2013] mainpage.pl: Use of uninitialized value $retuserid in string ne at
/home/mtompset/kohaclone/C4/Auth.pm line 832., referer:
http://demo.library-admin.kohasystem.ca/cgi-bin/koha/mainpage.pl?logout.x=1
[Thu Oct 24 14:30:42 2013] [error] [client 192.168.45.23] File does not exist:
/home/mtompset/kohaclone/koha-tmpl/intranet-tmpl/prog/en/css/color.css,
referer: http://demo.library-admin.kohasystem.ca/cgi-bin/koha/mainpage.pl
[Thu Oct 24 14:30:43 2013] [error] [client 192.168.45.23] [Thu Oct 24 14:30:43
2013] 404.pl: Use of uninitialized value $lasttime in numeric lt (<) at
/home/mtompset/kohaclone/C4/Auth.pm line 709., referer:
http://demo.library-admin.kohasystem.ca/cgi-bin/koha/mainpage.pl
[Thu Oct 24 14:30:43 2013] [error] [client 192.168.45.23] [Thu Oct 24 14:30:43
2013] 404.pl: Use of uninitialized value $pki_field in string ne at
/home/mtompset/kohaclone/C4/Auth.pm line 758., referer:
http://demo.library-admin.kohasystem.ca/cgi-bin/koha/mainpage.pl
[Thu Oct 24 14:30:43 2013] [error] [client 192.168.45.23] [Thu Oct 24 14:30:43
2013] 404.pl: Use of uninitialized value $pki_field in string eq at
/home/mtompset/kohaclone/C4/Auth.pm line 795., referer:
http://demo.library-admin.kohasystem.ca/cgi-bin/koha/mainpage.pl
[Thu Oct 24 14:30:43 2013] [error] [client 192.168.45.23] [Thu Oct 24 14:30:43
2013] 404.pl: Use of uninitialized value $pki_field in string eq at
/home/mtompset/kohaclone/C4/Auth.pm line 795., referer:
http://demo.library-admin.kohasystem.ca/cgi-bin/koha/mainpage.pl
[Thu Oct 24 14:30:43 2013] [error] [client 192.168.45.23] [Thu Oct 24 14:30:43
2013] 404.pl: Use of uninitialized value $retuserid in string ne at
/home/mtompset/kohaclone/C4/Auth.pm line 832., referer:
http://demo.library-admin.kohasystem.ca/cgi-bin/koha/mainpage.pl

Now apply the patch, clear the logs, and click that login button again.


[Thu Oct 24 14:32:54 2013] [error] [client 192.168.45.23] File does not exist:
/home/mtompset/kohaclone/koha-tmpl/intranet-tmpl/prog/en/css/color.css,
referer: http://demo.library-admin.kohasystem.ca/cgi-bin/koha/mainpage.pl
[Thu Oct 24 14:32:54 2013] [error] [client 192.168.45.23] [Thu Oct 24 14:32:54
2013] 404.pl: Use of uninitialized value $lasttime in numeric lt (<) at
/home/mtompset/kohaclone/C4/Auth.pm line 709., referer:
http://demo.library-admin.kohasystem.ca/cgi-bin/koha/mainpage.pl

The key is noticing that 832 did not trigger an error! This else is inside the
if which we fixed. So, 'None' is wrong, because it is a different behaviour. I
changed it to '', and retried.

[Thu Oct 24 14:37:04 2013] [error] [client 192.168.45.23] [Thu Oct 24 14:37:04
2013] mainpage.pl: Use of uninitialized value $retuserid in string ne at
/home/mtompset/kohaclone/C4/Auth.pm line 833., referer:
http://demo.library-admin.kohasystem.ca/cgi-bin/koha/mainpage.pl
[Thu Oct 24 14:37:04 2013] [error] [client 192.168.45.23] File does not exist:
/home/mtompset/kohaclone/koha-tmpl/intranet-tmpl/prog/en/css/color.css,
referer: http://demo.library-admin.kohasystem.ca/cgi-bin/koha/mainpage.pl
[Thu Oct 24 14:37:04 2013] [error] [client 192.168.45.23] [Thu Oct 24 14:37:04
2013] 404.pl: Use of uninitialized value $lasttime in numeric lt (<) at
/home/mtompset/kohaclone/C4/Auth.pm line 709., referer:
http://demo.library-admin.kohasystem.ca/cgi-bin/koha/mainpage.pl
[Thu Oct 24 14:37:04 2013] [error] [client 192.168.45.23] [Thu Oct 24 14:37:04
2013] 404.pl: Use of uninitialized value $retuserid in string ne at
/home/mtompset/kohaclone/C4/Auth.pm line 833., referer:
http://demo.library-admin.kohasystem.ca/cgi-bin/koha/mainpage.pl

This is correct behaviour, because there is an extra line added to clean up the
other silent errors and 833 - 1 = 832, and the error message matches.

So, I was wrong to second guess myself. Sorry, tcohen.

However, this does show that at least 2 other silent errors need correcting
before this bug is fully addressed. I'm setting this back to assigned.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list