You are not logged in.

#1 2012-04-20 18:55:09

_saiko
Member
From: systemreich
Registered: 2007-08-06
Posts: 91
Website

[SOLVED] Perl tainting check problem

Hi,

I'm having an issue using the perl date-manip libraries. To be precise Date::Manip::UnixDate doesn't seem to work.
My system is x86_64 with latest -Syu

$ perl -v
This is perl 5, version 14, subversion 2 (v5.14.2) built for x86_64-linux-thread-multi
$ perl -MDate::Manip -e 'print DateManipVersion()."\n";'
6.30

Libraries are installed...
Now to the problem

$ perl -w -MDate::Manip -e 'print DateManipVersion()."\n"; my $date = UnixDate("now", "%y"); print $date ."\n"'
6.30
12
$ perl -wT -MDate::Manip -e 'print DateManipVersion()."\n"; my $date = UnixDate("now", "%y"); print $date ."\n"'
Undefined subroutine &Date::Manip::UnixDate called at /home/saiko/test.pl line 5, <DATA> line 496.

Apparently it works without the tainting check (-T).
How come?

What am I missing?

Thanks

Last edited by _saiko (2012-04-21 02:27:15)


cat.7 - where crosstalk is not an issue anymore :'(

Offline

#2 2012-04-21 02:31:29

_saiko
Member
From: systemreich
Registered: 2007-08-06
Posts: 91
Website

Re: [SOLVED] Perl tainting check problem

Solved...

The error message was so misleading.
In the end tried to use the -MDate::Manip::DM6 to define the exact location of the subroutine in question.
Only then I got the familiar error:

$ perl -wT -MDate::Manip::DM6 -e 'print DateManipVersion() . "\n";'
Insecure $ENV{PATH} while running with -T switch at /usr/share/perl5/vendor_perl/Date/Manip/TZ.pm line 615, <DATA> line 429.
Compilation failed in require, <DATA> line 429.
BEGIN failed--compilation aborted, <DATA> line 429.

This made me remember a similar thread: https://bbs.archlinux.org/viewtopic.php?id=91981

Anyhow defining the /etc/timezone solves the problem.


cat.7 - where crosstalk is not an issue anymore :'(

Offline

Board footer

Powered by FluxBB