Jakub Narebski wrote: > When using regexp search ('sr' parameter / $search_use_regexp variable > is true), check first that regexp is valid. > > Without this patch we would get an error from Perl during search (if > searching is performed by gitweb), or highlighting matches substring > (if applicable), if user provided invalid regexp... which means broken > HTML, with error page (including HTTP headers) generated after gitweb > already produced some output. > > Add test that illustrates such error: for example for regexp "*\.git" > we would get the following error: > > Quantifier follows nothing in regex; marked by <-- HERE in m/* <-- HERE \.git/ > at /var/www/cgi-bin/gitweb.cgi line 3084. > > Reported-by: Ramsay Jones <ramsay@xxxxxxxxxxxxxxxxxxx> > Signed-off-by: Jakub Narebski <jnareb@xxxxxxxxx> > --- > See "Re: gitweb: (potential) problems with new installation" > http://thread.gmane.org/gmane.comp.version-control.git/191746 This patch solves the problem for me when using a regex search (re checkbox checked), but *not* for a non-regex search. If you have a leading '*' or '+', in the non-regex case, then you still get the above complaint (and xml error page etc.), although the line number has changed slightly from that given above. ATB, Ramsay Jones -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html