"be consistent" | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I've noticed that File::Find doesn't work under
taint checks. Eg :-
A bit of rooting about in the source code comes up with the problem - File::Find uses Cwd::cwd which produces tainted results. Eg:- Now I can see that it might be advantageous for setuid scripts to think that cwd() returns tainted data, but unfortunately this means that is isn't possible to use File::Find with -T set because the call to Cwd is internal to File::Find and can't be monkeyed with. Any ideas on how to get around this? PS This may be a un*x only problem I don't know. I tested this with 5.005_03 on linux. PPS The code for Cwd::cwd() looks like chop(`pwd`) which is rather unpleasant in my opinion because it is calling the shell which starts another process, takes time etc. (Remove the PATH in the Cwd example above and it will fail with can't find pwd!) In reply to Taint checking, File::Find and Cwd by ncw
|
|