Skip to content

Commit

Permalink
fix(frontend): refined sanitization
Browse files Browse the repository at this point in the history
  • Loading branch information
thewander02 committed Oct 16, 2024
1 parent 499aa60 commit 9b6e2ef
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion apps/frontend/src/components/ui/servers/LogParser.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,14 @@ const parsedLog = computed(() => {
});
const sanitizedLog = computed(() => {
return DOMPurify.sanitize(parsedLog.value);
return DOMPurify.sanitize(parsedLog.value, {
ALLOWED_TAGS: ["span"],
ALLOWED_ATTR: ["style"],
ALLOWED_CSS_STYLES: {
color: true,
"background-color": true,
},
});
});
</script>

Expand Down

0 comments on commit 9b6e2ef

Please sign in to comment.