Skip to content

Commit

Permalink
bug #5971 Fix XSS in autocomplete (simoheinonen)
Browse files Browse the repository at this point in the history
This PR was merged into the 4.x branch.

Discussion
----------

Fix XSS in autocomplete

Commits
-------

081ac97 Fix XSS in autocomplete
  • Loading branch information
javiereguiluz committed Oct 23, 2023
2 parents a134a1c + 081ac97 commit 7237fcb
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion assets/js/autocomplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ export default class Autocomplete
return `<div>${item.entityAsString}</div>`;
},
item: function(item, escape) {
return `<div>${item.entityAsString}</div>`;
return `<div>${escape(item.entityAsString)}</div>`;
},
loading_more: function(data, escape) {
return `<div class="loading-more-results">${element.getAttribute('data-ea-i18n-loading-more-results')}</div>`;
Expand Down

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/Resources/public/entrypoints.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"/app.1c98f4b0.rtl.css"
],
"js": [
"/app.c647be58.js"
"/app.a937f82e.js"
]
},
"form": {
Expand Down
2 changes: 1 addition & 1 deletion src/Resources/public/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"app.css": "app.1c98f4b0.css",
"app.rtl.css": "app.1c98f4b0.rtl.css",
"app.js": "app.c647be58.js",
"app.js": "app.a937f82e.js",
"form.js": "form.fc39362b.js",
"page-layout.js": "page-layout.3347892e.js",
"page-color-scheme.js": "page-color-scheme.a1970567.js",
Expand Down

0 comments on commit 7237fcb

Please sign in to comment.