RVE-2022-3 filter skin and style parameters again in PollModel class

해당 변수를 화면에 출력하는 스킨이 있으므로 이중 방어
This commit is contained in:
Kijin Sung 2022-06-29 15:35:51 +09:00
parent 97586855d7
commit 90e510091d

View file

@ -221,9 +221,10 @@ class pollModel extends poll
if(!$output->data) return '';
$poll = new stdClass;
$poll->style = $style;
$poll->style = preg_replace('/[^a-zA-Z0-9_-]/', '', $style);
$poll->poll_count = (int)$output->data->poll_count;
$poll->stop_date = $output->data->stop_date;
$skin = preg_replace('/[^a-zA-Z0-9_-]/', '', $skin);
$columnList = array('poll_index_srl', 'title', 'checkcount', 'poll_count');
$output = executeQuery('poll.getPollTitle', $args, $columnList);
@ -279,7 +280,7 @@ class pollModel extends poll
if(!$output->data) return '';
$poll = new stdClass;
$poll->style = $skin;
$poll->style = preg_replace('/[^a-zA-Z0-9_-]/', '', $skin);
$poll->poll_count = (int)$output->data->poll_count;
$poll->stop_date = $output->data->stop_date;