Subject: | taint() converts string to value 0! |
Calling taint() and passing it a string converts that string to a numeric 0. The offending code appears to be this:
if ( not $_ & '00' | '00' ) {
# Must already be a number,
# so don't stringify it now
$_ += $TAINT0;
} else {
$_ .= $TAINT;
}
At least under 5.6.1 and 5.8.3, the conditional appears to always be true, this num-ifying the passed in string.
I really don't know how to fix this without using XS (something like SvPOK).
Of course, wouldn't it be simpler to just rewrite the taint() function in XS and call SvTAINTED_on() ?
That's what I think, so I've included a patch that does that. It also includes a test for this bug.
Message body not shown because it is not plain text.