Skip Menu |

This queue is for tickets about the POE CPAN distribution.

Report information
The Basics
Id: 81550
Status: resolved
Priority: 0/
Queue: POE

People
Owner: Nobody in particular
Requestors: nicko [...] phone.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.350
Fixed in: (no value)



Subject: POE_TRACE_* and tainted mode
Hello, I ran into this while implementing a POE-based application: Setting a POE_TRACE variable is incompatible with programs using tainted mode. To reproduce:: $ cat poe.pl #!/usr/bin/perl -T use POE; $ perl -T poe.pl (OK) $ POE_TRACE_EVENTS=1 perl -T poe.pl * * POE can't use POE::Loop::Select: * Insecure dependency in require while running with -T switch at /usr/share/perl5/POE/Loop/Select.pm line 6. BEGIN failed--compilation aborted at /usr/share/perl5/POE/Loop/Select.pm line 6. Compilation failed in require at (eval 7) line 2. Proposed patch: *** Kernel.pm 2012-11-29 13:10:13.501586003 -0800 --- Kernel.pm.new 2012-11-29 13:22:54.765586002 -0800 *************** *** 355,360 **** --- 355,363 ---- # Copy so we don't hurt our environment. my $value = $val; + # Untaint + $value =~ /^([-\@\w.]+)$/; + $value = $1; $value =~ tr['"][]d; $value = 0 + $value if $value =~ /^\s*-?\d+(?:\.\d+)?\s*$/;
Thanks for the test case and patch. I was able to verify the problem here, and that your patch resolved it. commit 3fb1edba213e10ef85559eabfbbf3e9790841564 Author: Rocco Caputo <rcaputo@cpan.org> Date: Tue Jul 16 00:55:03 2013 -0400 [rt.cpan.org 81550] Untaint %ENV as it's examined for TRACE/ASSERTs.