-
-
Notifications
You must be signed in to change notification settings - Fork 212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
access denied and & issue #3943
Comments
@Jimmi08: How did you find this issue? I can't reproduce it unless I explicitly type |
@Deltik I use e107 with abantecart system. But while this test was in class2.php, it worked. I fixed it by using e107_class without this test. And I will have the next case with other CMS, so I will see what is causing the problem. It's one of the e107 advantages, you don't need some bridges, you just include class2.php and you can extend other CMS with e107 features. I know, not standard, but this is the first issue I run with it. |
@Jimmi08: I still don't see how just a As for the diff --git a/e107_0.7/class2.php b/e107_0.7/class2.php
index fa7b25453..31e96726b 100644
--- a/e107_0.7/class2.php
+++ b/e107_0.7/class2.php
@@ -12,9 +12,9 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.7/class2.php,v $
-| $Revision: 1.116 $
-| $Date: 2005-05-02 14:39:14 $
-| $Author: streaky $
+| $Revision: 1.117 $
+| $Date: 2005-05-02 17:37:03 $
+| $Author: stevedunstan $
+----------------------------------------------------------------------------+
*/
@@ -62,8 +62,16 @@ for ($i = 1; $i <= $num_levels; $i++) {
$link_prefix .= "../";
}
-if (!strstr($_SERVER['PHP_SELF'], "trackback") && (strstr($_SERVER['QUERY_STRING'], "'") || strstr($_SERVER['QUERY_STRING'], ";"))) {
- die("Access denied.");
+$inArray = array("'", ";", "/**/", "/UNION/", "/SELECT/", "AS");
+if (!strstr($_SERVER['PHP_SELF'], "trackback"))
+{
+ foreach($inArray as $res)
+ {
+ if(strstr($_SERVER['QUERY_STRING'], $res))
+ {
+ die("Access denied.");
+ }
+ }
}
if (preg_match("/\[(.*?)\].*?/i", $_SERVER['QUERY_STRING'], $matches)) {
@@ -229,6 +237,7 @@ $pref['htmlarea']=false;
define("e_SELF", ($pref['ssl_enabled'] ? "https://".$_SERVER['HTTP_HOST'].($_SERVER['PHP_SELF'] ? $_SERVER['PHP_SELF'] : $_SERVER['SCRIPT_FILENAME']) : "http://".$_SERVER['HTTP_HOST'].($_SERVER['PHP_SELF'] ? $_SERVER['PHP_SELF'] : $_SERVER['SCRIPT_FILENAME'])));
+/*
if($pref['redirectsiteurl'])
{
if($e107 -> http_path != $pref['siteurl'])
@@ -241,7 +250,7 @@ if($pref['redirectsiteurl'])
}
}
}
-
+*/
// Cameron's Mult-lang switch. ================== Maybe @CaMer0n can provide some input on whether that code is still good to have today. |
@Deltik that's the point It's not important, but if there is little chance that somebody uses |
I believe the semi-colon check can be removed. Commit coming shortly. |
Thank you! |
I got access denied on some urls.
I was able to narrow problem to this:
$_SERVER['QUERY_STRING'] : rt=product/product&product_id=123
failed test:
$res : ';'
it looks like stristr test
&
instead of&
No idea what to do.
Not for 100% sure, but I have integrated e107 with Nuke with similar URLs and it worked when the request part was in class2.php not in e107 class. Thanks
The text was updated successfully, but these errors were encountered: