Bug 33406: Filter out some known isolated trouble makers
Test plan: 1) Launch k-t-d with ES: -- ktd --es7 pull -- ktd --es7 up 2) Visit /cgi-bin/koha/authorities/authorities-home.pl and search for 'tim' 3) Edit that, add a dash '-' to 100$a, like 'Bunce, Tim - name'" 4) Do a authority search for 'tim - name', notice it errors out 5) Apply patch 6) Perform the same search, notice it doesn't error and returns the correct record Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> (cherry picked from commit27c6171222
) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> (cherry picked from commit14487cd5e0
) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
This commit is contained in:
parent
8ad444a891
commit
778f022e8a
1 changed files with 3 additions and 0 deletions
|
@ -1235,6 +1235,9 @@ sub _split_query {
|
|||
# Filter out empty values
|
||||
@tokens = grep( /\S/, @tokens );
|
||||
|
||||
# Filter out some known isolated trouble makers: -, ^, \, ~, +
|
||||
@tokens = grep( !/^[-\^\\~\+]*$/, @tokens );
|
||||
|
||||
return @tokens;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue