Testing sub directories using perl AGAIN
Hi,
Thank you for all the kind anwsers to my question a couple of weeks
ago.
But it is still not exactly what I want. All the answers used the
idea to compare the string, but what about
the following case:
dir1 = "/www/info/world";
dir2 = "/www/info/world/usa/../../../."
Now, clearly dir1 is a sub directory of dir2. So how do I test. Since
the security is a big concern of us, we cannot
afford the case like above.
Thanks.
Shao.
--
____________________________________________________________________________
Shao Zhang - Running Debian 2.1 ___ _ _____
Department of Communications / __| |_ __ _ ___ |_ / |_ __ _ _ _ __ _
University of New South Wales \__ \ ' \/ _` / _ \ / /| ' \/ _` | ' \/ _` |
Sydney, Australia |___/_||_\__,_\___/ /___|_||_\__,_|_||_\__, |
Email: shao@cia.edu.au |___/
_____________________________________________________________________________
Reply to: