We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Invalid GET Data error

Development and Programming

Ben @PutYourLightsOn's avatar
Ben @PutYourLightsOn
295 posts
16 years ago
Ben @PutYourLightsOn's avatar Ben @PutYourLightsOn

hi there,

i’m working on an OpenID module, see this post, and am running into an issue with the url that is posted back to my script. it has some url encoded characters in it such as % 3F (without the space) that are causing an Invalid GET Data error to be thrown. i see the code in core.input.php that is causing this:

elseif (preg_match("#(;|\?|exec\s*\(|system\s*\(|passthru\s*\(|cmd\s*\(|[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})#i", $val))
{
  exit('Invalid GET Data');
}

i can’t change the OpenID protocol, so any ideas on how to tackle this problem?

       
Robert Wallis's avatar
Robert Wallis
36 posts
16 years ago
Robert Wallis's avatar Robert Wallis

If you create a file in the module’s folder and then call it directly, you don’t have to have EE process it through the preg_match() filter you mentioned. Just put a file like callback.openid.php in the module folder along side the mod.openid.php file and send the url like this:

http://example.com/ee/modules/openid/callback.openid.php

If you are using Apache mod rewrite, just make sure this line is in your rewrite:

RewriteCond %{REQUEST_FILENAME} !-f

The “!-f” means not a file. So it will only send the file to EE if the file doesn’t exist. Therefore it will skip EE and go directly to the PHP file you give.

😊

       
Ben @PutYourLightsOn's avatar
Ben @PutYourLightsOn
295 posts
16 years ago
Ben @PutYourLightsOn's avatar Ben @PutYourLightsOn

thanks for the reply robert. yes i ended up using a very similar solution to what you suggested. its not ideal but it works well.

cheers

       
Bjørn Børresen's avatar
Bjørn Børresen
629 posts
15 years ago
Bjørn Børresen's avatar Bjørn Børresen

Hi ben,

is this module available anywhere? 😊

       
Ben @PutYourLightsOn's avatar
Ben @PutYourLightsOn
295 posts
15 years ago
Ben @PutYourLightsOn's avatar Ben @PutYourLightsOn

kind of got bogged down with other work. see http://ellislab.com/forums/viewthread/103414/ for the post details…

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.