[ic] paypal auto-return causes internal server error with empty string named parameter

Daniel Davenport ddavenport at newagedigital.com
Thu May 5 17:25:17 EDT 2005



>>> tom at ecnow.co.uk 05/03/05 5:09 PM >>>
>
>Hi all,
>
>The paypal auto-return feature allows the customer to click their ""
>button and be returned to the interchange site.
>
>However paypal currently use an input button with no name ie;
>
><input type="submit" name="" value="Return to Merchant">
>
>To cause the customer to be redirected back to the interchange site.
>
>However this is causing an "internal server error" when the customer is
>returned, due to the following piece of code;
>
<snip some code>
>                ($key, $value) = ($pair =~ m/([^=]+)=(.*)/)
>                        or do {
<snip some code>
>                        };
>
>
>I'm not entirely sure what the preferred action in this situation would
>be, I guess I would like the querystring pair with the empty name part
>to be ignored.
>But obviously, I don't think interchange to keel over so ungracefully.
>
>Any ideas on what I should do about this?

Replace the plus sign in the m/.../ above, with a star.  after the last line you pasted, make sure a line exists that says 

          next if $key eq "";

That should discard input fields that don't have a name, and IC won't die.

btw.....Are empty form element names kosher?  I hadn't even thought about it, but it seems it'd violate a spec somewhere.

/daniel




More information about the interchange-users mailing list