mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-02 01:52:10 +09:00
Throw SecurityViolation if anyone tries to exploit RVE-2022-2 with GET/POST vars
This commit is contained in:
parent
1ab9a2899b
commit
9170d9444c
1 changed files with 9 additions and 0 deletions
|
|
@ -54,6 +54,15 @@ class pageView extends page
|
|||
{
|
||||
// Variables used in the template Context:: set()
|
||||
if($this->module_srl) Context::set('module_srl',$this->module_srl);
|
||||
|
||||
// Kick out anyone who tries to exploit RVE-2022-2.
|
||||
foreach (Context::getRequestVars() as $key => $val)
|
||||
{
|
||||
if (preg_match('/[\{\}\(\)<>\$\'"]/', $key) || preg_match('/[\{\}\(\)<>\$\'"]/', $val))
|
||||
{
|
||||
throw new Rhymix\Framework\Exceptions\SecurityViolation();
|
||||
}
|
||||
}
|
||||
|
||||
$page_type_name = strtolower($this->module_info->page_type);
|
||||
$method = '_get' . ucfirst($page_type_name) . 'Content';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue