> Perhaps someone more experienced can comment on this one. I'm not > exactly sure, but i suspect you found nothing for the following simple > reason: if all you want to do is checking for simple path traversal > under Unix, m/^\// and m/\.\./ are all you need.
Except that it would make valid names like "path/foo...bar/baz" fail. I'd rather test for m#(?:^|/)\.\.(?:/|$)# (perl regexp) or m#^\.\.$# m#^\.\./# m#/\.\./# m#/\.\.$# Untested though. Expect it to fail or don't blame me. /Alexander