[Rt-commit] rt branch, 4.2/cf-with-unusual-chars-in-search-builder, created. rt-4.2.1-32-g18d6959

? sunnavy sunnavy at bestpractical.com
Tue Nov 26 09:02:54 EST 2013


The branch, 4.2/cf-with-unusual-chars-in-search-builder has been created
        at  18d6959104002f585c0da469e166470e12ce9e19 (commit)

- Log -----------------------------------------------------------------
commit 18d6959104002f585c0da469e166470e12ce9e19
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Tue Nov 26 21:39:39 2013 +0800

    use the same charset as in RT::SQL($re_keyword) to decide if we shall quote or not
    
    the old regex could cause parse error, see #27170.
    the issue was introduced by 3bef226, so 4.0 isn't affected.

diff --git a/share/html/Search/Build.html b/share/html/Search/Build.html
index 02e9a56..5eb241f 100644
--- a/share/html/Search/Build.html
+++ b/share/html/Search/Build.html
@@ -241,7 +241,7 @@ foreach my $arg ( keys %ARGS ) {
             $value = "'$value'";
         }
 
-        if ($keyword =~ s/(['\\])/\\$1/g or $keyword =~ /\s/) {
+        if ($keyword =~ s/(['\\])/\\$1/g or $keyword =~ /[^{}\w\.]/) {
             $keyword = "'$keyword'";
         }
 

-----------------------------------------------------------------------


More information about the rt-commit mailing list