Subject: Re: [PATCH (BUGFIX)] gitweb: Handle invalid regexp in regexp search

From: Jakub Narebski <[email-masked]>
Date: Wed, 29 Feb 2012 16:56:35 +0100

Junio C Hamano wrote:
> Jakub Narebski <[email-masked]> writes:
> 
> > When using regexp search ('sr' parameter / $search_use_regexp variable
> > is true), check first that regexp is valid.
> 
> Thanks.
> 
> How old is this bug?  Should it go to older maitenance tracks like 1.7.6?

>>From what I examined this bug is from the very beginning when gitweb
started to distinguish regexp search and fixed string search in

  0e55991 (gitweb: Clearly distinguish regexp / exact match searches, 2008-02-26)

It was present in 1.5.5 (including beginnings of match highlighting, which
trigger this bug).

This bug was present so long without detection because circumstances must
be quite specific: you have to select regexp search, and to provide invalid
regexp.  If you know what regexp is, you probably write correct ones...
but there always room for mistake.

-- 
Jakub Narebski
Poland