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

Tom Hodder tom at ecnow.co.uk
Tue May 3 17:02:04 EDT 2005

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;

        # This loop semi-duplicated in store_cgi_kv
        foreach $pair (grep length, @pairs) {
                ($key, $value) = ($pair =~ m/([^=]+)=(.*)/)
                        or do {
                                if ($Global::TolerateGet) {
                                        $key = $pair;
                                        $value = undef;
                                elsif($CGI::request_method =~ /^post$/i) {
                                        die ::errmsg("Syntax error in 
POST input: %s\n%s", $pair, $$sref);
                                else {
                                        die ::errmsg("Syntax error in 
GET input: %s\n", $pair);

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?





More information about the interchange-users mailing list