mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-10-02 07:35:03 -04:00
fix(security): strip all HTML tags from $.notify alert messages (#4716)
This commit is contained in:
1 parent
9cafea0eed
commit
5d56c2cecd
1 file changed
+1
-1
@@ -21,7 +21,7 @@
|
||||
|
||||
$.notify = function(content, options) {
|
||||
const message = typeof content === "object" ? content.message : content;
|
||||
const sanitizedMessage = DOMPurify.sanitize(message);
|
||||
const sanitizedMessage = DOMPurify.sanitize(message, { ALLOWED_TAGS: [], ALLOWED_ATTR: [] });
|
||||
return notify(sanitizedMessage, options);
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user