[sf-perl] Worry about bsd_glob() generated paths?
extasia at gmail.com
Mon May 9 16:16:55 PDT 2005
I want to take various actions based on the ages of a set of files.
The set of files will be specified as a file glob (or set thereof) in
a config file. I'll be using File::Glob::bsd_glob() to expand the
globs. On each resulting path, I'll be doing:
not -e $path and complain();
$age = -M _;
File::Glob warns that all values returned are tainted. Fine. But all
I'm really doing with the paths is calling stat() with them, and
print() (and possibly printf()). Do I really need to check to see if
they contain bad characters in this situation?
The program will be run only from a non-privileged user's crontab. It
does not involve any network connections.
Live in a world of your own, but always welcome visitors.
More information about the SanFrancisco-pm