Michael Alipio wrote:
Hi,

Hello again,

:-)


  $$postdata{'login:command/username'} = ($username eq '')?'':$username;

$$postdata{'login:command/username'} is usually written as
$postdata->{'login:command/username'}.  You compare
$username to '' and if it is equal to '' then you return ''
and if it is not equal to '' you return $username.  The
test is superfluous, just assign $username.


I tried that one. I ran the code against the web application and
proxied the requests, the form parameter
e.g, &username=admin&password=&blah=

If I will just assign $username or $password I will end up with a non
blank value +0x (something like that) and the application would throw
an error.

Ex.: the following parameter/value is sent to the web app.

&username=admin&password=+0x

While if I only have &username=admin&password=&nextparameter

The web app will respond properly.

Sorry, I don't know enough about web applications to diagnose that.


From what I understand from reading the documentation the
second argument to POST should be an array reference but you
are passing it a hash reference.

I'm not sure about this but the first sub was called and executed
properly.
The second sub won't execute because the $postdata in there is empty.



When I run my program, I get an error:
An error or a warning?  An error will usually halt the
program while a warning will not.


I think it is an error, because the program halts. It is supposed to
do some more routines after those two.

It is hard to tell from the limited amount of code provided
what exactly is causing your problem.


What else can I do?

Have you enabled the warnings and strict pragmas? Have you enabled "taint" checks? Have you checked the server logs for relevant error messages?


What other information can I provide?

I assume that this is running under a web server as a CGI program?

What modules are being used?

Which operating system is this running on?

Which version of Perl is this running on?




John
--
Those people who think they know everything are a great
annoyance to those of us who do.        -- Isaac Asimov

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to