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?
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.
😊
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.