From: xangelo Date: Mon, 21 Aug 2023 20:04:33 +0000 (-0400) Subject: fix: strip all tags in chat X-Git-Tag: v0.2.13~1 X-Git-Url: https://git.xangelo.ca/?a=commitdiff_plain;h=9da5336c43a171a676c3e538345911740f5f635e;p=risinglegends.git fix: strip all tags in chat --- diff --git a/src/server/api.ts b/src/server/api.ts index d8296fc..a0c4f45 100644 --- a/src/server/api.ts +++ b/src/server/api.ts @@ -416,7 +416,9 @@ app.post('/chat', authEndpoint, async (req: AuthRequest, res: Response) => { } } else { - message = broadcastMessage(req.player.username, xss(msg)); + message = broadcastMessage(req.player.username, xss(msg, { + whiteList: {} + })); chatHistory.push(message); chatHistory.slice(-10); }