Skip to content

Commit 5606a2b

Browse files
committed
fix: account for whitespace in style tag regex to prevent XSS
1 parent 58f3714 commit 5606a2b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎apps/dokploy/pages/_document.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ Document.getInitialProps = async (
8282
metaTitle = config.metaTitle;
8383
// Remove any </style> tags to prevent XSS breakout
8484
customCss = config.customCss
85-
? config.customCss.replace(/<\/style>/gi, "")
85+
? config.customCss.replace(/<\/\s*style\s*>/gi, "")
8686
: null;
8787
faviconHref = config.faviconUrl || null;
8888
}

0 commit comments

Comments
 (0)