From: Jakub Narebski Date: Wed, 29 Feb 2012 15:56:35 GMT Subject: Re: [PATCH (BUGFIX)] gitweb: Handle invalid regexp in regexp search Message-ID: <201202291656.36222.jnareb@gmail.com> In-Reply-To: <7vwr76yc6w.fsf@alter.siamese.dyndns.org> Junio C Hamano wrote: > Jakub Narebski 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