in reply to Path Traversal Vulnerability
Yes, the code isn't safe - see my node Calling External Commands More Safely.
In the first case, I recommend using File::Find or File::Find::Rule instead of shelling out to find. In the second case, since you're apparently piping things to the command and from the command, I would suggest IPC::Run3 (assuming the input and output are not too big, as the module usually works via temporary files) - but it would also be worth looking into whether uda_consolidate.pl could be designed as a module callable directly from your script.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Path Traversal Vulnerability
by Rishi2Monk (Novice) on Dec 27, 2022 at 08:51 UTC | |
by Corion (Patriarch) on Dec 27, 2022 at 08:54 UTC | |
by haukex (Archbishop) on Dec 27, 2022 at 09:00 UTC | |
|