Skip to content

Commit

Permalink
Merge pull request #3038 from acrobat/xss-fixes
Browse files Browse the repository at this point in the history
[AllBundles] Escape user input to avoid xss issues
  • Loading branch information
acrobat committed Nov 22, 2021
2 parents e9e82ee + 8b5578e commit b58d64a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/Kunstmaan/AdminBundle/Resources/ui/js/_slug-chooser.js
Expand Up @@ -47,7 +47,8 @@ kunstmaanbundles.slugChooser = (function(window, undefined) {
return;
}

$preview.find('span').html(updatedUrl);
// Use jquery .text to escape user input value to avoid potential xss
$preview.find('span').text(updatedUrl);
$preview.show();
};

Expand Down
Expand Up @@ -110,5 +110,5 @@
{% endif %}

{% if seo.getExtraMetadata() %}
{{ seo.getExtraMetadata() | raw }}
{{ seo.getExtraMetadata()|escape('html')|raw }}
{% endif %}

0 comments on commit b58d64a

Please sign in to comment.