Merge branch 'jn/maint-do-not-match-with-unsanitized-searchtext' into maint
authorJunio C Hamano <gitster@pobox.com>
Mon, 12 Mar 2012 22:45:57 +0000 (15:45 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 12 Mar 2012 22:45:58 +0000 (15:45 -0700)
"gitweb" did use quotemeta() to prepare search string when asked to
do a fixed-string project search, but did not use it by mistake and
used the user-supplied string instead.

By Jakub Narebski
* jn/maint-do-not-match-with-unsanitized-searchtext:
gitweb: Fix fixed string (non-regexp) project search

1  2 
gitweb/gitweb.perl
index 20ace61b6d158934068bb1e25408336f2058781f,a7e0d8f6887c7a9cf2671d9d419c8728a3924fcf..b9c33ba31d538e87f69a8f742b1f8ff2134cfd8c
@@@ -5289,9 -5087,9 +5289,9 @@@ sub git_project_list_body 
  
        my $check_forks = gitweb_check_feature('forks');
        my $show_ctags  = gitweb_check_feature('ctags');
 -      my $tagfilter = $show_ctags ? $cgi->param('by_tag') : undef;
 +      my $tagfilter = $show_ctags ? $input_params{'ctag'} : undef;
        $check_forks = undef
-               if ($tagfilter || $searchtext);
+               if ($tagfilter || $search_regexp);
  
        # filtering out forks before filling info allows to do less work
        @projects = filter_forks_from_projects_list(\@projects)