Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Re: How do you clean up user specified filenames?

by tomhukins (Curate)
on Feb 21, 2001 at 21:13 UTC ( [id://59965]=note: print w/replies, xml ) Need Help??


in reply to Re: How do you clean up user specified filenames?
in thread How do you clean up user specified filenames?

The problem with tr/A-Za-z_.-//dc; is that the . character could be used to attempt to open the current or parent directory.

I'm paranoid enough to do something like

tr/A-Za-z_.-//dc; s/^\.+$//;
to make sure the user doesn't enter a string containing only dots.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (2)
As of 2024-04-25 20:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found