RVE-2022-3 filter skin parameter and others in dispLayoutPreviewWithModule()

This commit is contained in:
Kijin Sung 2022-06-28 20:12:02 +09:00
parent 3dfd78b729
commit 97586855d7

View file

@ -41,12 +41,11 @@ class layoutView extends layout
public function dispLayoutPreviewWithModule()
{
$content = '';
$layoutSrl = Context::get('layout_srl');
$module = Context::get('module_name');
$mid = Context::get('target_mid');
$skin = Context::get('skin');
$skinType = Context::get('skin_type');
$layoutSrl = intval(Context::get('layout_srl'));
$module = preg_replace('/[^a-zA-Z0-9_]/', '', Context::get('module_name'));
$mid = preg_replace('/[^a-zA-Z0-9\/_-]/', '', Context::get('target_mid'));
$skin = preg_replace('/[^a-zA-Z0-9_-]/', '', Context::get('skin'));
$skinType = Context::get('skin_type') === 'M' ? 'M' : 'P';
try
{