[Bug 40270] New: Remove useless warnings on failed SIP2 login
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40270 Bug ID: 40270 Summary: Remove useless warnings on failed SIP2 login Change sponsored?: --- Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: SIP2 Assignee: koha-bugs@lists.koha-community.org Reporter: tomascohen@gmail.com QA Contact: testopia@bugs.koha-community.org We see this consistently in the logs: Use of uninitialized value $args[0] in sprintf at /kohadevbox/koha/C4/SIP/Sip.pm line 314 Use of uninitialized value $args[1] in sprintf at /kohadevbox/koha/C4/SIP/Sip.pm line 314 -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40270 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40270 --- Comment #1 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 183631 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=183631&action=edit Bug 40270: Fix uninitialized value warnings in SIP logging The SIP server generates warnings when logging account information for failed logins: Use of uninitialized value $args[0] in sprintf at /kohadevbox/koha/C4/SIP/Sip.pm line 314 Use of uninitialized value $args[1] in sprintf at /kohadevbox/koha/C4/SIP/Sip.pm line 314 This occurs when $self->{account}->{id} or $self->{account}->{institution} are undefined during failed authentication attempts. This patch fixes the issue by: 1. Adding a safer sprintf implementation in siplog that handles undefined values 2. Providing default values for undefined account information in logging calls To test: 1. Start SIP server 2. Attempt to connect with invalid credentials using sip_cli_emulator.pl: ./misc/sip_cli_emulator.pl -a 127.0.0.1 -p 6001 -su invaliduser -sp wrongpass -l kohalibrary2 --patron koha -m patron_information 3. Check /var/log/koha/kohadev/sip-output.log => FAIL: 'Use of uninitialized value...' warns 4. Apply this patch 5. Repeat 2 => SUCCESS: No "Use of uninitialized value" warnings appear => SUCCESS: Logging shows 'undef/undef' for failed logins instead of empty strings 6. Try a valid login => SUCCESS: Still works correctly for valid logins 7. Sign off :-D -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40270 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |tomascohen@gmail.com |ity.org | CC| |kyle@bywatersolutions.com, | |lucas@bywatersolutions.com, | |tomascohen@gmail.com -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40270 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40270 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #183631|0 |1 is obsolete| | --- Comment #2 from David Nind <david@davidnind.com> --- Created attachment 183633 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=183633&action=edit Bug 40270: Fix uninitialized value warnings in SIP logging The SIP server generates warnings when logging account information for failed logins: Use of uninitialized value $args[0] in sprintf at /kohadevbox/koha/C4/SIP/Sip.pm line 314 Use of uninitialized value $args[1] in sprintf at /kohadevbox/koha/C4/SIP/Sip.pm line 314 This occurs when $self->{account}->{id} or $self->{account}->{institution} are undefined during failed authentication attempts. This patch fixes the issue by: 1. Adding a safer sprintf implementation in siplog that handles undefined values 2. Providing default values for undefined account information in logging calls To test: 1. Start SIP server 2. Attempt to connect with invalid credentials using sip_cli_emulator.pl: ./misc/sip_cli_emulator.pl -a 127.0.0.1 -p 6001 -su invaliduser -sp wrongpass -l kohalibrary2 --patron koha -m patron_information 3. Check /var/log/koha/kohadev/sip-output.log => FAIL: 'Use of uninitialized value...' warns 4. Apply this patch 5. Repeat 2 => SUCCESS: No "Use of uninitialized value" warnings appear => SUCCESS: Logging shows 'undef/undef' for failed logins instead of empty strings 6. Try a valid login => SUCCESS: Still works correctly for valid logins 7. Sign off :-D Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40270 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40270 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #183633|0 |1 is obsolete| | --- Comment #3 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- Created attachment 185004 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=185004&action=edit Bug 40270: Fix uninitialized value warnings in SIP logging The SIP server generates warnings when logging account information for failed logins: Use of uninitialized value $args[0] in sprintf at /kohadevbox/koha/C4/SIP/Sip.pm line 314 Use of uninitialized value $args[1] in sprintf at /kohadevbox/koha/C4/SIP/Sip.pm line 314 This occurs when $self->{account}->{id} or $self->{account}->{institution} are undefined during failed authentication attempts. This patch fixes the issue by: 1. Adding a safer sprintf implementation in siplog that handles undefined values 2. Providing default values for undefined account information in logging calls To test: 1. Start SIP server 2. Attempt to connect with invalid credentials using sip_cli_emulator.pl: ./misc/sip_cli_emulator.pl -a 127.0.0.1 -p 6001 -su invaliduser -sp wrongpass -l kohalibrary2 --patron koha -m patron_information 3. Check /var/log/koha/kohadev/sip-output.log => FAIL: 'Use of uninitialized value...' warns 4. Apply this patch 5. Repeat 2 => SUCCESS: No "Use of uninitialized value" warnings appear => SUCCESS: Logging shows 'undef/undef' for failed logins instead of empty strings 6. Try a valid login => SUCCESS: Still works correctly for valid logins 7. Sign off :-D Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40270 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |nick@bywatersolutions.com |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40270 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |25.11.00 released in| | Status|Passed QA |Pushed to main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40270 --- Comment #4 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Nice work everyone! Pushed to main for 25.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40270 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|25.11.00 |25.11.00,25.05.03 released in| | Status|Pushed to main |Pushed to stable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40270 --- Comment #5 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Nice work everyone! Pushed to 25.05.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40270 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m Status|Pushed to stable |Pushed to oldstable Version(s)|25.11.00,25.05.03 |25.11.00,25.05.03,24.11.09 released in| | --- Comment #6 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 24.11.x for 24.11.09 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40270 Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to oldstable |Needs documenting --- Comment #7 from Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> --- Not backporting to 22.11.x as it wasn't backported to 24.05.x -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org