delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/01/28/21:46:13

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-Authentication-Warning: slinky.cs.nyu.edu: pechtcha owned process doing -bs
Date: Wed, 28 Jan 2004 21:45:58 -0500 (EST)
From: Igor Pechtchanski <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: cygwin AT cygwin DOT com
Subject: Re: [PATCH] Fix for broken package-grep.cgi (Attn: CGF)
In-Reply-To: <20040129004128.GB1624@redhat.com>
Message-ID: <Pine.GSO.4.56.0401282133520.4101@slinky.cs.nyu.edu>
References: <600B91D5E4B8D211A58C00902724252C01BC04D3 AT piramida DOT hermes DOT si> <Pine DOT GSO DOT 4 DOT 56 DOT 0401281005560 DOT 5576 AT slinky DOT cs DOT nyu DOT edu> <Pine DOT GSO DOT 4 DOT 56 DOT 0401281930240 DOT 1236 AT slinky DOT cs DOT nyu DOT edu> <20040129004128 DOT GB1624 AT redhat DOT com>
MIME-Version: 1.0

On Wed, 28 Jan 2004, Christopher Faylor wrote:

> On Wed, Jan 28, 2004 at 07:38:26PM -0500, Igor Pechtchanski wrote:
>
> >P.S. The same problem will happen (in a different place) if one searches
> >for 'g++'.  There is a way to escape the '+'s in this case, though (by
> >searching for 'g\+\+' instead), and I don't think we want to disallow the
> >full RE searches just yet...  Just in case, I have a patch ready for that,
> >too.
>
> We don't want to disable regex searches.  This is correct.

Well, then, we should produce meaningful error messages on broken regexes,
instead of filling the server log.  Something like the code below should
do it...

unless (eval { local $_=""; /$grep/o; } or $@ !~ /regex/) {
    print "<b>$grep</b>: invalid regex!<br><br>\n";
} else {
    # Do our stuff
}

Should I get this working and check it in?

> >ChangeLog:
> >2004-01-28  Igor Pechtchanski  <pechtcha AT cs DOT nyu DOT edu>
> >
> >       * package-grep.cgi (findheader): Quote raw filename in pattern.
>
> Please check in.
> Thanks,
> cgf

Done.
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha AT cs DOT nyu DOT edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor AT watson DOT ibm DOT com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster."  -- Patrick Naughton

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019