grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] '.' causes wildcard expansion


From: Robert Mabee
Subject: Re: [PATCH] '.' causes wildcard expansion
Date: Wed, 20 Jun 2012 04:04:34 -0400
User-agent: Mozilla/5.0 (X11; Linux i686; rv:12.0) Gecko/20120430 Thunderbird/12.0.1

On 06/19/2012 08:19 AM, Vladimir 'φ-coder/phcoder' Serbinenko wrote:
I've fixed these problems AFAICT now. Can you confirm?
I agree that many extraneous regex chars are now properly quoted so no more
functionality is exposed than is intended, now * and ?. I suggest also quoting ^ and $ just for completeness. I can not explain why @ is quoted; it's not mentioned
in the documentation for POSIX-compatible regex or in gnulib/regcomp.c.

wildcard_escape in script/execute.c quotes the wild chars and [ , which is no longer wild. This can lead to a surprising extra level of quoting, so for example *'['*
becomes the useless regexp pattern ^.*\\\[.*$

It appears the only remaining use of isregexop is in make_dir, which removes \
quoting only before regex chars, from path components that weren't wild.
If this quoting was inserted by wildcard_escape then it should be removed similarly
to wildcard_unescape, which doesn't examine the quoted char.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]