Wouldn't it be easily accomplished (the rename()) if he stripped any characters from the filename that would cause issues? I guess what I'm failing to see is what happens to bad filenames after they're moved. I'm looking at the problem as if we have good filenames and bad filenames. If it's not good, I need to move the file elsewhere. Thus, I need to know if the filename has any characters that would cause the rename function to explode. After that, I would simply use another script to inspect the internals of the files considered bad.
The environment seems to be controlled, in the sense that both directories are only accessible to "trusted users". I may be wrong about that. But if that's the case, then what is the difference between inspection before moving and inspection afterwards. I'm battling this out since I want to know why the previously suggested way of checking the file is better than this idea of having a second script check the bad files.
ALL HAIL BRAK!!!
In reply to Re: Re: Re: Re: Re: Untainting 'bad' filenames
by PsychoSpunk
in thread Untainting 'bad' filenames
by doran
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |