Skip to content

Commit

Permalink
GHSA-grj5-8fcj-34gh follow-up fix (#5751)
Browse files Browse the repository at this point in the history
Not sure how this was lost during the back&forth during the GHSA process but we missed escaping the 3rd parameter of raise_message_javascript().
  • Loading branch information
Beuc authored May 18, 2024
1 parent b577c29 commit 6a82fa1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -1053,7 +1053,7 @@ function raise_message_javascript($title, $header, $message) {
var mixedReasonTitle = DOMPurify.sanitize(<?php print json_encode($title, JSON_THROW_ON_ERROR);?>);
var mixedOnPage = DOMPurify.sanitize(<?php print json_encode($header, JSON_THROW_ON_ERROR);?>);
sessionMessage = {
message: DOMPurify.sanitize('<?php print $message;?>'),
message: DOMPurify.sanitize(<?php print json_encode($message, JSON_THROW_ON_ERROR);?>),
level: MESSAGE_LEVEL_MIXED
};

Expand Down

0 comments on commit 6a82fa1

Please sign in to comment.