mirror of
https://github.com/discourse/discourse.git
synced 2025-06-06 11:36:01 +08:00
SECURITY: XSS when displaying watched words in admin panel.
The XSS here is only possible if CSP is disabled. Low impact since CSP is enabled by default in SiteSettings.
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
import { iconHTML } from "discourse-common/lib/icon-library";
|
||||
import { bufferedRender } from "discourse-common/lib/buffered-render";
|
||||
import { escapeExpression } from "discourse/lib/utilities";
|
||||
|
||||
export default Ember.Component.extend(
|
||||
bufferedRender({
|
||||
@ -7,7 +8,7 @@ export default Ember.Component.extend(
|
||||
|
||||
buildBuffer(buffer) {
|
||||
buffer.push(iconHTML("times"));
|
||||
buffer.push(" " + this.get("word.word"));
|
||||
buffer.push(` ${escapeExpression(this.get("word.word"))}`);
|
||||
},
|
||||
|
||||
click() {
|
||||
|
Reference in New Issue
Block a user