[Bug 15722] New: Patron search cannot deal with special characters in fields
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15722 Bug ID: 15722 Summary: Patron search cannot deal with special characters in fields Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Patrons Assignee: koha-bugs@lists.koha-community.org Reporter: kyle@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com The patron search for a library was failing to return and was hung on "processing" what I found was that the patron's email address had a tab and a space at the end. When these were outputted in the json template members/tables/members_results.tt my browser ( chrome ) was unable to process the data giving a syntax error. I found this be recreating the query and calling svc/member/search directly from my browser. -- 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=15722 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Patron search cannot deal |Patron search cannot deal |with special characters in |with hidden characters ( |fields |tabs ) in fields -- 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=15722 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Kyle, I don't reproduce: update borrowers set email="my@email.com\t " where borrowernumber=42; Then the results are displayed correctly. Moreover the email value is not displayed in the table. Could you detail please? -- 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=15722 --- Comment #2 from Kyle M Hall <kyle@bywatersolutions.com> --- Here is a screencast of me reproducing the issue: http://screencast.com/t/ew0siMJQU I used Sequel Pro to insert the tab and space. -- 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=15722 Ian Bays <ian.bays@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ian.bays@ptfs-europe.com --- Comment #3 from Ian Bays <ian.bays@ptfs-europe.com> --- We have encountered this problem too in data loaded that came with unexpected tabs in the borrower data. It was very difficult to track down. Exactly the symptoms seen by Kyle. No errors that we could see and nothing in the koha error logs that we could find. -- 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=15722 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- 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=15722 --- Comment #4 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 48786 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=48786&action=edit Bug 15722: Escape patron infos for JSON in patron searches If patron infos contain invalid JSON chars (\t for instance), the results won't appear. The solution is to escape these info. Test plan: Edit patron infos in DB (update borrowers set surname="foobar\t" where borrowernumber=42) Search for foobar (you should have more than 1 result) Without this patch, DT retrieves a bad formatted JSON and the results won't appear. With this patch, the table result appears -- 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=15722 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |jonathan.druart@bugs.koha-c |ity.org |ommunity.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=15722 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=15722 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #48786|0 |1 is obsolete| | --- Comment #5 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 48789 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=48789&action=edit Bug 15722: Escape patron infos for JSON in patron searches If patron infos contain invalid JSON chars (\t for instance), the results won't appear. The solution is to escape these info. Test plan: Edit patron infos in DB (update borrowers set surname="foobar\t" where borrowernumber=42) Search for foobar (you should have more than 1 result) Without this patch, DT retrieves a bad formatted JSON and the results won't appear. With this patch, the table result appears Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15722 --- Comment #6 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 49517 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=49517&action=edit k -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15722 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch 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=15722 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #48789|0 |1 is obsolete| | Attachment #49517|0 |1 is obsolete| | --- Comment #7 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 49518 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=49518&action=edit [PASSED QA] Bug 15722: Escape patron infos for JSON in patron searches If patron infos contain invalid JSON chars (\t for instance), the results won't appear. The solution is to escape these info. Test plan: Edit patron infos in DB (update borrowers set surname="foobar\t" where borrowernumber=42) Search for foobar (you should have more than 1 result) Without this patch, DT retrieves a bad formatted JSON and the results won't appear. With this patch, the table result appears Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15722 Brendan Gallagher <brendan@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |brendan@bywatersolutions.co | |m --- Comment #8 from Brendan Gallagher <brendan@bywatersolutions.com> --- Pushed to Master - Should be in May 2016 release. Thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15722 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |16214 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16214 [Bug 16214] Surname not displayed in serials patron search results -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15722 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |julian.maurice@biblibre.com --- Comment #9 from Julian Maurice <julian.maurice@biblibre.com> --- Note to myself: waiting for bug 16214 to be pushed to master, so I can push them both into 3.22.x at the same time -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15722 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable --- Comment #10 from Julian Maurice <julian.maurice@biblibre.com> --- Patch pushed to 3.22.x, will be in 3.22.6 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15722 Frédéric Demians <frederic@tamil.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |frederic@tamil.fr --- Comment #11 from Frédéric Demians <frederic@tamil.fr> --- Pushed to 3.20.x, will be in 3.20.11. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org