Subject: | Kafka::IO Insecure Dependency error in Perl taint mode |
Date: | Sun, 4 Jan 2015 22:38:40 +0000 |
To: | bug-Kafka [...] rt.cpan.org |
From: | Hari Sekhon <harisekhon [...] gmail.com> |
Hi,
When trying to use the Perl Kafka library version 0.8008 I get the
following error message when running in perl secure taint mode (perl -T)
Insecure dependency in connect while running with -T switch at
/usr/local/share/perl5/Kafka/IO.pm line 401.
The output from PERL_KAFKA_DEBUG=1 is
[Sun Jan 4 22:29:10 2015 ] name = 'sandbox.hortonworks.com', number of
wallclock seconds = 2
[Sun Jan 4 22:29:10 2015 ] _connect: ip = '10.0.2.15, error = '', $? = 0,
$! = '0'
[Sun Jan 4 22:29:10 2015 ] _connect: 10 (remaining) - 0 (elapsed) = 10
[Sun Jan 4 22:29:10 2015 ] _connect: remaining - elapsed > 0 (to alarm
restart)
[Sun Jan 4 22:29:10 2015 ] _connect: after alarm 'recalled'
Insecure dependency in connect while running with -T switch at
/usr/local/share/perl5/Kafka/IO.pm line 401.
I believe this occurs when my program hit this point:
my $offsets = $consumer->offsets($topic, 0, -1);
I use taint mode all the time and $topic is untainted via regex capture.
Best Regards,
Hari Sekhon
http://www.linkedin.com/in/harisekhon