Summary: | Patron search cannot deal with hidden characters ( tabs ) in fields | ||
---|---|---|---|
Product: | Koha | Reporter: | Kyle M Hall <kyle> |
Component: | Patrons | Assignee: | Jonathan Druart <jonathan.druart> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | brendan, f.demians, gmcharlt, ian.bays, jonathan.druart, julian.maurice, kyle.m.hall |
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Bug Depends on: | |||
Bug Blocks: | 16214 | ||
Attachments: |
Bug 15722: Escape patron infos for JSON in patron searches
Bug 15722: Escape patron infos for JSON in patron searches k [PASSED QA] Bug 15722: Escape patron infos for JSON in patron searches |
Description
Kyle M Hall
2016-02-02 14:10:06 UTC
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? Here is a screencast of me reproducing the issue: http://screencast.com/t/ew0siMJQU I used Sequel Pro to insert the tab and space. 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. Created attachment 48786 [details] [review] 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 Created attachment 48789 [details] [review] 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> Created attachment 49517 [details] [review] k Created attachment 49518 [details] [review] [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> Pushed to Master - Should be in May 2016 release. Thanks! 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 Patch pushed to 3.22.x, will be in 3.22.6 Pushed to 3.20.x, will be in 3.20.11. |