Subject: | Minor bug in rmtree with newlines in CWD |
It looks like the untaint line in sub rmtree needs a /s flag adding, ie
for ($arg->{cwd}) { /\A(.*)\Z/; $_ = $1 } # untaint
should be changed to
for ($arg->{cwd}) { /\A(.*)\Z/s; $_ = $1 } # untaint
Else weird things happen if the CWD has a newline in it
($arg->{cwd} will be set to $1, which will be set from any previous
regex match, since the /\A(.*)\Z/ match will fail).
This usually results in rmtree incorrectly failing with
a weird "cannot stat" error message.
David