[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [Off Topic] Dumb Perl Question...



Adam Shand wrote:
> How do I untaint the glob, or better yet access it so that it's not
> tainted to start with (if that's possible)? The files I'm accessing are
> safe as only root can write to them, but I'd like to do this the 'right
> way'.
> 
> I can't find anything relevant to this in the docs/web/books (doubtless
> I'm just looking in the wrong places) and it's starting to get
> irritating :)

perldoc perlsec is your friend! :)

Bottom line is that globs are *always* tainted, as is anything that
relies on shell processing (csh being how globbing is done).

Try using File::Find, that should let you get data in an untainted manner.

Stephen
---
"Normality is a statistical illusion." -- me



--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-user-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .


Reply to: