His regular expression does the job well. It strips everything until the last /
$req = 'blah/../../topsecretpages/page.html'; $req =~ s/^.*\///; print $req; __END__ page.html
In reply to Re^4: request for review: file reading security
by Chady
in thread request for review: file reading security
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |