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

Tom Hodder tom at ecnow.co.uk
Thu May 5 18:54:46 EDT 2005


>
>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
>  
>
Also, I did this;

  CGIVAL: {
        # 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);
                                }
                        };

                next if ( $key eq '');

Is there any problem with doing that?

-- 

Tom



More information about the interchange-users mailing list