mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
Misc
* don't cache playlists * don't cache new custom profiles * forgot to sanitize and use param from js
This commit is contained in:
@@ -14,6 +14,7 @@ class AjaxProfile extends AjaxHandler
|
|||||||
'size' => [FILTER_SANITIZE_STRING, 0xC], // FILTER_FLAG_STRIP_LOW | *_HIGH
|
'size' => [FILTER_SANITIZE_STRING, 0xC], // FILTER_FLAG_STRIP_LOW | *_HIGH
|
||||||
'guild' => [FILTER_CALLBACK, ['options' => 'AjaxHandler::checkEmptySet']],
|
'guild' => [FILTER_CALLBACK, ['options' => 'AjaxHandler::checkEmptySet']],
|
||||||
'arena-team' => [FILTER_CALLBACK, ['options' => 'AjaxHandler::checkEmptySet']],
|
'arena-team' => [FILTER_CALLBACK, ['options' => 'AjaxHandler::checkEmptySet']],
|
||||||
|
'user' => [FILTER_CALLBACK, ['options' => 'AjaxProfile::checkUser']]
|
||||||
);
|
);
|
||||||
|
|
||||||
protected $_post = array(
|
protected $_post = array(
|
||||||
@@ -714,6 +715,13 @@ class AjaxProfile extends AjaxHandler
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function checkUser($val)
|
||||||
|
{
|
||||||
|
if (User::isValidName($val))
|
||||||
|
return $val
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -29,6 +29,9 @@ class ProfilePage extends GenericPage
|
|||||||
|
|
||||||
public function __construct($pageCall, $pageParam)
|
public function __construct($pageCall, $pageParam)
|
||||||
{
|
{
|
||||||
|
if (!CFG_PROFILER_ENABLE)
|
||||||
|
$this->error();
|
||||||
|
|
||||||
$params = array_map('urldecode', explode('.', $pageParam));
|
$params = array_map('urldecode', explode('.', $pageParam));
|
||||||
if ($params[0])
|
if ($params[0])
|
||||||
$params[0] = Profiler::urlize($params[0]);
|
$params[0] = Profiler::urlize($params[0]);
|
||||||
@@ -106,6 +109,8 @@ class ProfilePage extends GenericPage
|
|||||||
}
|
}
|
||||||
else if (($params && $params[0]) || !isset($_GET['new']))
|
else if (($params && $params[0]) || !isset($_GET['new']))
|
||||||
$this->notFound();
|
$this->notFound();
|
||||||
|
else if (isset($_GET['new']))
|
||||||
|
$this->mode = CACHE_TYPE_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function generateContent()
|
protected function generateContent()
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ class SoundPage extends GenericPage
|
|||||||
$this->cat = 1000;
|
$this->cat = 1000;
|
||||||
$this->articleUrl = 'sound&playlist';
|
$this->articleUrl = 'sound&playlist';
|
||||||
$this->hasComContent = false;
|
$this->hasComContent = false;
|
||||||
|
$this->mode = CACHE_TYPE_NONE;
|
||||||
}
|
}
|
||||||
// regular case
|
// regular case
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user