From 07db71b009ad82dba4a6fb7898bae9ae2d4ea020 Mon Sep 17 00:00:00 2001 From: meem <75212565+meemofcourse@users.noreply.github.com> Date: Fri, 29 Sep 2023 23:37:04 -0300 Subject: [PATCH] Removes the ability for players to use a table's background attribute in html to embed images (#2383) ## About The Pull Request a table has a background attribute which can render images from links ## Why It's Good For The Game security issue bad ## Changelog :cl: del: you can no longer bypass image sanitization with tables /:cl: --- tgui/packages/tgui/sanitize.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tgui/packages/tgui/sanitize.ts b/tgui/packages/tgui/sanitize.ts index a40d23a320d3..bd67b969a3c5 100644 --- a/tgui/packages/tgui/sanitize.ts +++ b/tgui/packages/tgui/sanitize.ts @@ -48,7 +48,7 @@ const defTag = [ // Advanced HTML tags that we can trust admins (but not players) with const advTag = ['img']; -const defAttr = ['class', 'style']; +const defAttr = ['class', 'style', 'background']; /** * Feed it a string and it should spit out a sanitized version.