in reply to Tainted variable
Tainting occurs if you try and pass any uncontrolled information to the system interpreter. The use of kill 0 attempts to trick the perl interpreter into thinking that you are passing sensitive information (@_) to the system. If tainting fails, it will cause the script to halt execution right then and there -- so the block is wrapped in an eval block. If the data is safe, the join('',@_),kill 0; will not die and the block will return the last value of "1" signifying that the data is not tainted, this is negated with the "!" and returned as the value. If the data was tainted, the block would haved died and the eval would return undef.Here's an example (which doesn't use any system calls, because the kil +l() is given no processes to signal).
|
|---|