Merge pull request #1909 from dewekk/fix-page

위젯 페이지에서 괄호 등 GET/POST 불가 문제 수정
This commit is contained in:
Kijin Sung 2022-06-09 21:04:37 +09:00 committed by GitHub
commit f78b28fadb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -67,15 +67,6 @@ class pageView extends page
{
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();
}
}
// Get page content according to page type.
$page_type_name = strtolower($this->module_info->page_type);
@ -167,6 +158,15 @@ class pageView extends page
return;
}
// 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();
}
}
// External URL
if (preg_match('!^[a-z]+://!i', $this->path))
{