help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: NON-trivial regular expression problem (could not find on google)


From: Bruce Barnett
Subject: Re: NON-trivial regular expression problem (could not find on google)
Date: 24 Jan 2003 11:20:11 GMT
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

democrat@india.com (Instant Democracy) writes:

> The task is to eliminate patterns such as 
>     DIRNAME/../
> from the path because they are redundant.

I assume that you are also trying to deal with security issues.
(Someone trying deliberately to gain access to fles outside of a directory)

Don't forget to include these cases:

        DIRNAME/./../
        DIRNAME/././../ etc.

        And also consider whatever quoting/conversions might occur.
        Hex encoding? Backslashes?

        How are "//" interpreted? Some cases these are treated as a single 
slash.
        Other cases it's the top of the directory.

        A/DIRNAME//../ - is this A, or / ?



-- 
Sending unsolicited commercial e-mail to this account incurs a fee of 
$500 per message, and acknowledges the legality of this contract.


reply via email to

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