Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

RE: RE: Re: File Naming

by Fastolfe (Vicar)
on Aug 01, 2000 at 22:49 UTC ( #25534=note: print w/replies, xml ) Need Help??


in reply to RE: Re: File Naming
in thread File Naming

This is probably a little simpler and a lot safer:
$had_bad_characters = $user =~ s/\W//g; # Safer still (since what's defined as a 'word character' could change + based on locale/Unicode (?)) $user =~ s/[^a-zA-Z_-]//g; # Explicitely define what we want to ACCE +PT as valid
Generally the secure approach involves defining what is acceptable and disallowing everything else, not trying to filter out what we know/anticipate to be bad, because stuff frequently slips through.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2023-11-29 12:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?