While beginning to demonstrate an idea of a regex to deal with (pronounced: prohibit) paths like: /etc/passwd and ../../../someFile, common-sense kicked in and persuaded me to look for the pre-invented wheel.
A search through Perl Monks revealed nothing complete, and CPAN seems to have no modules to handle this very common task.
Where can I find pathname validation code?
In reply to Upload Security (strip ../, etc.) by Russ
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |