Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^4: request for review: file reading security

by Chady (Priest)
on Sep 05, 2004 at 15:57 UTC ( #388623=note: print w/ replies, xml ) Need Help??


in reply to Re^3: request for review: file reading security
in thread request for review: file reading security

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

He who asks will be a fool for five minutes, but he who doesn't ask will remain a fool for life.
Chady | http://chady.net/
Are you a Linux user in Lebanon? join the Lebanese Linux User Group.


Comment on Re^4: request for review: file reading security
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://388623]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2015-07-05 10:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (61 votes), past polls