[Bug 25903] New: Sending a SIP patron information request with a summary field flag in indexes 6-9 will crash server
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25903 Bug ID: 25903 Summary: Sending a SIP patron information request with a summary field flag in indexes 6-9 will crash server Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: SIP2 Assignee: koha-bugs@lists.koha-community.org Reporter: kyle@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: colin.campbell@ptfs-europe.com The 'summary' field in the patron information request specifies if detail information should be send for holds, overdues, fines, etc. The field is 10 characters in length (0-9). However, the SIP2 spec only defines indexes 0 though 5, leave 6 though 9 undefined. Some ILSs specify behavior for these undefined indexes. Apparently the 7th field is often used to request 'Fees', as opposed to 'Fines' in some ILS. Some software that integrate via SIP try both the 5th and 7th indexes to ensure they get all fines and fees. The problem is that Koha's SIP server crashes if any 'summary' index beyond 5 is flagged. We should simply ignore flags beyond 5 and act as if no flags were sent. -- 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=25903 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |normal Assignee|koha-bugs@lists.koha-commun |kyle@bywatersolutions.com |ity.org | -- 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=25903 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25903 --- Comment #1 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 106443 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=106443&action=edit Bug 25903: Sending a SIP patron information request with a summary field flag in indexes 6-9 will crash server The 'summary' field in the patron information request specifies if detail information should be send for holds, overdues, fines, etc. The field is 10 characters in length (0-9). However, the SIP2 spec only defines indexes 0 though 5, leave 6 though 9 undefined. Some ILSs specify behavior for these undefined indexes. Apparently the 7th field is often used to request 'Fees', as opposed to 'Fines' in some ILS. Some software that integrate via SIP try both the 5th and 7th indexes to ensure they get all fines and fees. The problem is that Koha's SIP server crashes if any 'summary' index beyond 5 is flagged. We should simply ignore flags beyond 5 and act as if no flags were sent. Test Plan: 1) Enable SIP for your instance 2) Send a patron information request with a summary flag in any index beyond 5. i.e.: 6300120200617 124846 Y AOMIDAY|AA21030050054321 3) Note the SIP server just closes the connection without a response 4) Apply this patch 5) Restart the SIP server 6) Send the same request 7) Note you get back the patron information response! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25903 Kyle M Hall <kyle@bywatersolutions.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=25903 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #106443|0 |1 is obsolete| | --- Comment #2 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 106452 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=106452&action=edit Bug 25903: Sending a SIP patron information request with a summary field flag in indexes 6-9 will crash server The 'summary' field in the patron information request specifies if detail information should be send for holds, overdues, fines, etc. The field is 10 characters in length (0-9). However, the SIP2 spec only defines indexes 0 though 5, leave 6 though 9 undefined. Some ILSs specify behavior for these undefined indexes. Apparently the 7th field is often used to request 'Fees', as opposed to 'Fines' in some ILS. Some software that integrate via SIP try both the 5th and 7th indexes to ensure they get all fines and fees. The problem is that Koha's SIP server crashes if any 'summary' index beyond 5 is flagged. We should simply ignore flags beyond 5 and act as if no flags were sent. Test Plan: 1) Enable SIP for your instance 2) Send a patron information request with a summary flag in any index beyond 5. i.e.: 6300120200617 124846 Y AOMIDAY|AA21030050054321 3) Note the SIP server just closes the connection without a response 4) Apply this patch 5) Restart the SIP server 6) Send the same request 7) Note you get back the patron information response! Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jeff Gaines <jgaine@arlingtonva.us> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25903 --- Comment #3 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hi Kyle and others, patch applies, QA script passes, but I have some trouble setting up SIP on kohadevbox as it doesn't appear to work automatically for me anymore (error on reset_all?). Can you help me with the steps for "1) Enable SIP for your instance"? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25903 --- Comment #4 from Kyle M Hall <kyle@bywatersolutions.com> --- It's working for me in koha-testing-docker. root@e9e637b7f066:koha(bug25903-qa)$ ./misc/sip_cli_emulator.pl -a 127.0.0.1 -p 6001 -su koha -sp koha -l LIB -m patron_information --patron 42 Attempting socket connection to 127.0.0.1:6001...connected! SEND: 9300CNkoha|COkoha|CPLIB| READ: 941 Trying 'patron_information' SEND: 6300120200818 120149 AOLIB|AA42|ACkoha| READ: 64 00120200818 120151000000000000000000000000AOkohalibrary|AA42|AE koha|BLY|CC5|PCS|PIY|AFGreetings from Koha. | Can you verify your SIP server is running? (In reply to Katrin Fischer from comment #3)
Hi Kyle and others,
patch applies, QA script passes, but I have some trouble setting up SIP on kohadevbox as it doesn't appear to work automatically for me anymore (error on reset_all?).
Can you help me with the steps for "1) Enable SIP for your instance"?
-- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25903 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #106452|0 |1 is obsolete| | --- Comment #5 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 108632 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=108632&action=edit Bug 25903: Sending a SIP patron information request with a summary field flag in indexes 6-9 will crash server The 'summary' field in the patron information request specifies if detail information should be send for holds, overdues, fines, etc. The field is 10 characters in length (0-9). However, the SIP2 spec only defines indexes 0 though 5, leave 6 though 9 undefined. Some ILSs specify behavior for these undefined indexes. Apparently the 7th field is often used to request 'Fees', as opposed to 'Fines' in some ILS. Some software that integrate via SIP try both the 5th and 7th indexes to ensure they get all fines and fees. The problem is that Koha's SIP server crashes if any 'summary' index beyond 5 is flagged. We should simply ignore flags beyond 5 and act as if no flags were sent. Test Plan: 1) Enable SIP for your instance 2) Send a patron information request with a summary flag in any index beyond 5. i.e.: 6300120200617 124846 Y AOMIDAY|AA21030050054321 3) Note the SIP server just closes the connection without a response 4) Apply this patch 5) Restart the SIP server 6) Send the same request 7) Note you get back the patron information response! Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jeff Gaines <jgaine@arlingtonva.us> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25903 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA CC| |martin.renvoize@ptfs-europe | |.com --- Comment #6 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Patch works as described.. I feel like in the future perhaps we should add support for these 'special' value that fall outside the standard range.. but preventing an explosion seems to be the correct initial behaviour here. Passing QA. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25903 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Failed QA CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #7 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Can we have tests for this change please? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25903 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25903 --- Comment #8 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 108734 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=108734&action=edit Bug 25903: Add unit tests -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25903 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |20.11.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25903 --- Comment #9 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Pushed to master for 20.11, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25903 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Pushed to stable Version(s)|20.11.00 |20.11.00, 20.05.04 released in| | CC| |lucas@bywatersolutions.com --- Comment #10 from Lucas Gass <lucas@bywatersolutions.com> --- backported to 20.05.x for 20.05.04 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25903 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|20.11.00, 20.05.04 |20.11.00, 20.05.04, released in| |19.11.10 CC| |aleisha@catalyst.net.nz Status|Pushed to stable |Pushed to oldstable --- Comment #11 from Aleisha Amohia <aleisha@catalyst.net.nz> --- backported to 19.11.x for 19.11.10 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25903 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |victor@tuxayo.net --- Comment #12 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Not backported to oldoldstable (19.05.x). Feel free to ask if it's needed. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org