Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > de-taint doesn't work after upgrading perl

Reply
Thread Tools

de-taint doesn't work after upgrading perl

 
 
mickjames@gmail.com
Guest
Posts: n/a
 
      01-08-2005
Hi,

In a cgi script I'm detainting an input variable as
$FORM{'input'} =~ tr/A-Z//cd;
and then passing it to a system call as
system "proggy",$FORM{'input'};

It was working in old perl 5.6 but doesn't in 5.8.
Perl complains about "Insecure dependency".
How should it be detainted now?

Thanks much!

 
Reply With Quote
 
 
 
 
Gunnar Hjalmarsson
Guest
Posts: n/a
 
      01-08-2005
wrote:
> In a cgi script I'm detainting an input variable as
> $FORM{'input'} =~ tr/A-Z//cd;
> and then passing it to a system call as
> system "proggy",$FORM{'input'};
>
> It was working in old perl 5.6 but doesn't in 5.8.
> Perl complains about "Insecure dependency".
> How should it be detainted now?


Didn't know the above ever was an allowed way to untaint. This is an
equivalent that does untaint:

$FORM{'input'} = join '', $FORM{'input'} =~ /[A-Z]/g;

Please also study

perldoc perlsec

--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
 
Reply With Quote
 
 
 
 
mickjames@gmail.com
Guest
Posts: n/a
 
      01-08-2005
Thanks for your help. Perl has the best support of all!

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
My Auto Incrementing NumberedLabel doesn't work after upgrading to ASP.NET 2.0 Atif Sarfraz ASP .Net Web Controls 0 11-30-2006 06:41 PM
Application does not work after upgrading from W2k to XP stephen ASP .Net 0 06-19-2006 04:34 PM
Laptop won't connect to internet after upgrading to SP2 =?Utf-8?B?am9obm55X3dheg==?= Wireless Networking 1 07-31-2005 02:35 AM
Windows Media Player doesn't work after upgrading to SP2 , what do I do ??? jeff Computer Support 3 06-06-2005 07:37 PM
Problem with inside to inside traffic after upgrading PIX 515 Cisco 5 06-15-2004 06:34 AM



Advertisments