Skip to content

Commit

Permalink
Fixed issue #19019: [security] Stored XSS in description of theme (#3359
Browse files Browse the repository at this point in the history
)

Co-authored-by: lapiudevgit <devgit@lapiu.biz>
  • Loading branch information
gabrieljenik and lapiudevgit committed Sep 13, 2023
1 parent 794e9f3 commit 1ab6c1b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions application/models/TemplateConfiguration.php
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,7 @@ public function getDescription()
// Note: if no twig statement in the description, twig will just render it as usual
try {
$sDescription = App()->twigRenderer->convertTwigToHtml($this->template->description);
$sDescription = viewHelper::purified($sDescription);
} catch (\Exception $e) {
// It should never happen, but let's avoid to anoy final user in production mode :)
if (YII_DEBUG) {
Expand Down

0 comments on commit 1ab6c1b

Please sign in to comment.