in reply to having horrors untainting a path string for moving a file
You need to untaint $ENV{PATH} because the user could change it to run his mv instead of the system one. This is particularly relevant in setuid scripts.
In this case, why don't you do
rename $a{from}, $a{to} or die("mov problem.. [$!]");
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: having horrors untainting a path string for moving a file
by Fletch (Bishop) on Mar 14, 2006 at 18:47 UTC | |
by ikegami (Patriarch) on Mar 14, 2006 at 18:50 UTC |