The patron name keyword search, introduced in bug 1776020, can crash when supplied with a single quotation mark as the search string. The associated error message is:
net.js:119 error calling method open-ils.actor.patron.search.advanced.fleshed : 500 : *** Call to [open-ils.actor.patron.search.advanced.fleshed] failed for session [0.98703998489481461536081818521], thread trace [0]:
Exception: OpenSRF::EX::ERROR 2018-09-04T13:41:40 OpenSRF::Application /usr/local/share/perl/5.24.1/OpenSRF/Application.pm:243 System ERROR: Call to open-ils.storage for method open-ils.storage.actor.user.crazy_search
failed with exception: Exception: OpenSRF::EX::ERROR 2018-09-04T13:41:40 OpenILS::Application::AppUtils /usr/local/share/perl/5.24.1/OpenILS/Application/AppUtils.pm:201 System ERROR: Exception: OpenSRF::DomainObject::oilsMethodException 2018-09-04T13:41:40 OpenSRF::AppRequest /usr/local/share/perl/5.24.1/OpenSRF/AppSession.pm:1149 <500> *** Call to [open-ils.storage.actor.user.crazy_search] failed for session [1536082899.863611540.94075152383], thread trace [1]:
DBD::Pg::db selectcol_arrayref failed: ERROR: syntax error in tsquery: "':*" [for Statement " SELECT evergreen.lowercase(CAST(users.family_name AS text)), evergreen.lowercase(CAST(users.first_given_name AS text)), evergreen.lowercase(CAST(users.second_given_name AS text)), evergreen.lowercase(CAST(users.dob AS text)), evergreen.lowercase(CAST(users.id AS text))
FROM actor.usr AS users
JOIN actor.org_unit_descendants(1) d ON (d.id = users.home_ou)
JOIN (SELECT id as id FROM actor.usr u WHERE name_kw_tsvector @@ to_tsquery(?)) AS search ON (search.id = users.id)
WHERE users.deleted = FALSE
AND users.active = TRUE
GROUP BY evergreen.lowercase(CAST(users.family_name AS text)), evergreen.lowercase(CAST(users.first_given_name AS text)), evergreen.lowercase(CAST(users.second_given_name AS text)), evergreen.lowercase(CAST(users.dob AS text)), evergreen.lowercase(CAST(users.id AS text))
ORDER BY evergreen.lowercase(CAST(users.family_name AS text)) ASC, evergreen.lowercase(CAST(users.first_given_name AS text)) ASC, evergreen.lowercase(CAST(users.second_given_name AS text)) ASC, evergreen.lowercase(CAST(users.dob AS text)) DESC, evergreen.lowercase(CAST(users.id AS text))
LIMIT 25
OFFSET 0
"] at /usr/local/share/perl/5.24.1/OpenILS/Application/Storage/Publisher/actor.pm line 903.
The patron name keyword search, introduced in bug 1776020, can crash when supplied with a single quotation mark as the search string. The associated error message is:
net.js:119 error calling method open-ils. actor.patron. search. advanced. fleshed : 500 : *** Call to [open-ils. actor.patron. search. advanced. fleshed] failed for session [0.987039984894 814615360818185 21], thread trace [0]: :Application /usr/local/ share/perl/ 5.24.1/ OpenSRF/ Application. pm:243 System ERROR: Call to open-ils.storage for method open-ils. storage. actor.user. crazy_search :Application: :AppUtils /usr/local/ share/perl/ 5.24.1/ OpenILS/ Application/ AppUtils. pm:201 System ERROR: Exception: OpenSRF: :DomainObject: :oilsMethodExce ption 2018-09-04T13:41:40 OpenSRF::AppRequest /usr/local/ share/perl/ 5.24.1/ OpenSRF/ AppSession. pm:1149 <500> *** Call to [open-ils. storage. actor.user. crazy_search] failed for session [1536082899. 863611540. 94075152383] , thread trace [1]: lowercase( CAST(users. family_ name AS text)), evergreen. lowercase( CAST(users. first_given_ name AS text)), evergreen. lowercase( CAST(users. second_ given_name AS text)), evergreen. lowercase( CAST(users. dob AS text)), evergreen. lowercase( CAST(users. id AS text)) unit_descendant s(1) d ON (d.id = users.home_ou)
Exception: OpenSRF::EX::ERROR 2018-09-04T13:41:40 OpenSRF:
failed with exception: Exception: OpenSRF::EX::ERROR 2018-09-04T13:41:40 OpenILS:
DBD::Pg::db selectcol_arrayref failed: ERROR: syntax error in tsquery: "':*" [for Statement " SELECT evergreen.
FROM actor.usr AS users
JOIN actor.org_
JOIN (SELECT id as id FROM actor.usr u WHERE name_kw_tsvector @@ to_tsquery(?)) AS search ON (search.id = users.id)
WHERE users.deleted = FALSE
AND users.active = TRUE
GROUP BY evergreen. lowercase( CAST(users. family_ name AS text)), evergreen. lowercase( CAST(users. first_given_ name AS text)), evergreen. lowercase( CAST(users. second_ given_name AS text)), evergreen. lowercase( CAST(users. dob AS text)), evergreen. lowercase( CAST(users. id AS text)) lowercase( CAST(users. family_ name AS text)) ASC, evergreen. lowercase( CAST(users. first_given_ name AS text)) ASC, evergreen. lowercase( CAST(users. second_ given_name AS text)) ASC, evergreen. lowercase( CAST(users. dob AS text)) DESC, evergreen. lowercase( CAST(users. id AS text)) share/perl/ 5.24.1/ OpenILS/ Application/ Storage/ Publisher/ actor.pm line 903.
ORDER BY evergreen.
LIMIT 25
OFFSET 0
"] at /usr/local/
: