Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Perl Beginners Cgi > Insecure depend...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 2 Topic 1460 of 1483
Post > Topic >>

Insecure dependency in eval message

by Sonny.Rajagopalan@[EMAIL PROTECTED] (Dylanthomasfan) Apr 13, 2008 at 07:12 AM

Hi,

I am a Perl CGI beginner. I am trying to construct perl statements to
do depending on user input, and interpret them at runtime using eval.
I execute these commands by writing

eval $commandString;

where $commandString is constructed as per user input.

if $commandString="simpleSubroutine();" my eval works well, but if
$commandString="notSoSimpleSubroutine(\"$string1\", \"$string2\");" my
eval bombs with the following message:

Insecure dependency in eval while running with -T switch at /var/www/
CGI/process.cgi line 92. Line 92 points to the line
eval $commandString;

Any pointers on what is going on? I have read about unsafe characters,
and tried the following:

$safeCommand=uri_escape($commandString);
eval $commandString;
(that does not work).

I have also tried substituting $string1 and $string2 with literals.
I.e., I tried
$commandString="notSoSimpleSubroutine(\"delta\", \"gamma\");"
and that works just fine. So I gathered that the eval could be bombing
because, perhaps variables ($string1 and $string2) above are not safe?
However, I need the flexibility of using $string1 and $string2.

Any workaround? Any help is greatly appreciated.

Thanks.
 




 2 Posts in Topic:
Insecure dependency in eval message
Sonny.Rajagopalan@[EMAIL   2008-04-13 07:12:40 
Re: Insecure dependency in eval message
greg@[EMAIL PROTECTED] (  2008-04-13 17:29:48 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Sep 5 11:56:57 CDT 2008.