Skip to content

Commit

Permalink
Fixed issue #18904: [security] Stored XSS with Expression Script in E…
Browse files Browse the repository at this point in the history
…nd page (#3402)
  • Loading branch information
gabrieljenik committed Sep 15, 2023
1 parent 9a6265a commit 749a475
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions application/helpers/SurveyRuntimeHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -1313,9 +1313,13 @@ private function moveSubmitIfNeeded()
$blocks[] = CHtml::tag('div', array('id' => $blockData->getCssId(), 'class' => $blockData->getCssClass()), $blockData->getContent());
}

$validator = new LSYii_Validators();
$this->aSurveyInfo['aCompleted']['sPluginHTML'] = implode("\n", $blocks) . "\n";
$this->aSurveyInfo['surveyls_url'] = passthruReplace($this->aSurveyInfo['surveyls_url'], $this->aSurveyInfo);
$this->aSurveyInfo['surveyls_url'] = $this->processString($this->aSurveyInfo['surveyls_url'], 3, 1);
if ($validator->isXssUrl($this->aSurveyInfo['surveyls_url'])) {
$this->aSurveyInfo['surveyls_url'] = "";
}
$this->aSurveyInfo['aCompleted']['sSurveylsUrl'] = $this->aSurveyInfo['surveyls_url'];
$this->aSurveyInfo['surveyls_urldescription'] = $this->processString($this->aSurveyInfo['surveyls_urldescription'], 3, 1);
$this->aSurveyInfo['aCompleted']['sSurveylsUrlDescription'] = $this->aSurveyInfo['surveyls_urldescription'];
Expand Down

0 comments on commit 749a475

Please sign in to comment.