Bugzilla – Attachment 63957 Details for
Bug 16976
Authorities searches with double quotes gives ZOOM error 20003
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16976: Authorities searches with double quotes gives ZOOM error 20003
Bug-16976-Authorities-searches-with-double-quotes-.patch (text/plain), 2.19 KB, created by
Marc Véron
on 2017-06-05 07:15:48 UTC
(
hide
)
Description:
Bug 16976: Authorities searches with double quotes gives ZOOM error 20003
Filename:
MIME Type:
Creator:
Marc Véron
Created:
2017-06-05 07:15:48 UTC
Size:
2.19 KB
patch
obsolete
>From d968b0a3fa7b046b9d67f27230ffab7e5f36d24f Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Marc=20V=C3=A9ron?= <veron@veron.ch> >Date: Mon, 5 Jun 2017 09:08:35 +0200 >Subject: [PATCH] Bug 16976: Authorities searches with double quotes gives ZOOM > error 20003 > >To recreate: >Go to Home > Authorities >Search "test" (including double quotes > >Result: Internal server error, plack error log says: >ZOOM error 20003 "can't set prefix query" (addinfo: "@or @attr 7=1 @attr 1=Heading 0 @attr 1=Heading-Main @attr 5=1 @attr 4=6 "\\"test\\""") from diag-set 'ZOOM' > >To test: >- Appply patch, restart memchached an dplack >- Repeat search "test" >- Verify that there is no internal server error >- Add an authority containing quotes, e.g. Johann "Wolfie" Goethe >- Search after Wolfie (without quotes) >- Verify that authority ist found >- Search after "Wolfie" >- Verify that authority is found >- Verify that other searches for authorities behave as before > >Technical note: Escaping did not work. The patch simply removes double >quotes from search values. Not sure if that is the ultimate solution, but >it works. >--- > authorities/authorities-home.pl | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > >diff --git a/authorities/authorities-home.pl b/authorities/authorities-home.pl >index d9c5ac8..a0ebeaf 100755 >--- a/authorities/authorities-home.pl >+++ b/authorities/authorities-home.pl >@@ -82,7 +82,8 @@ if ( $op eq "do_search" ) { > my $operator = $query->param('operator') || ''; > my $orderby = $query->param('orderby') || ''; > my $value = $query->param('value') || ''; >- >+ my $value_no_doublequotes = $value; >+ $value_no_doublequotes =~ s/\"//g; > my $startfrom = $query->param('startfrom') || 1; > my $resultsperpage = $query->param('resultsperpage') || 20; > >@@ -92,7 +93,7 @@ if ( $op eq "do_search" ) { > { index => $Koha::SearchEngine::AUTHORITIES_INDEX } ); > my $search_query = $builder->build_authorities_query_compat( > [$marclist], [$and_or], [$excluding], [$operator], >- [$value], $authtypecode, $orderby >+ [$value_no_doublequotes], $authtypecode, $orderby > ); > my $offset = ( $startfrom - 1 ) * $resultsperpage + 1; > my ( $results, $total ) = >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 16976
:
63957
|
63963
|
64382
|
64384
|
64655
|
64923
|
64998
|
64999
|
65901
|
65902
|
65903
|
65904
|
65905
|
66017
|
66018