mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-27 09:49:22 +02:00
Revert "Security fix"
This reverts commit ef2a4082980ef55f811803eff155c1d356465b26.
This commit is contained in:
parent
e3c695175b
commit
aa26a71949
18
index.php
18
index.php
@ -81,7 +81,7 @@ if(empty($uri) || isset($_REQUEST['template'])) {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$tmp = strtolower($uri);
|
$tmp = strtolower($uri);
|
||||||
if(preg_match('/^[A-z0-9_\-]+$/', $uri) && file_exists(SYSTEM . 'pages/' . $tmp . '.php')) {
|
if(!preg_match('/[^A-z0-9_\-]/', $uri) && file_exists(SYSTEM . 'pages/' . $tmp . '.php')) {
|
||||||
$_REQUEST['p'] = $uri;
|
$_REQUEST['p'] = $uri;
|
||||||
$found = true;
|
$found = true;
|
||||||
}
|
}
|
||||||
@ -156,18 +156,16 @@ else {
|
|||||||
|
|
||||||
// define page visited, so it can be used within events system
|
// define page visited, so it can be used within events system
|
||||||
$page = isset($_REQUEST['subtopic']) ? $_REQUEST['subtopic'] : (isset($_REQUEST['p']) ? $_REQUEST['p'] : '');
|
$page = isset($_REQUEST['subtopic']) ? $_REQUEST['subtopic'] : (isset($_REQUEST['p']) ? $_REQUEST['p'] : '');
|
||||||
if(empty($page) || !preg_match('/^[A-z0-9_\-]+$/', $page)) {
|
if(empty($page) || !preg_match('/^[A-z0-9\_\-]+$/', $page)) {
|
||||||
if(!$found) {
|
$tmp = URI;
|
||||||
$page = '404';
|
if(!empty($tmp)) {
|
||||||
|
$page = $tmp;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$tmp = URI;
|
if(!$found)
|
||||||
if (!empty($tmp)) {
|
$page = '404';
|
||||||
$page = $tmp;
|
else
|
||||||
}
|
|
||||||
else {
|
|
||||||
$page = 'news';
|
$page = 'news';
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user