From 86753958c503eef75804026e8498b08ba724fee4 Mon Sep 17 00:00:00 2001 From: sreekanth Date: Fri, 4 Sep 2020 12:19:10 +0530 Subject: [PATCH 1/6] stored xss fix --- package.json | 3 +- www/index.html | 1 + www/scripts/hichat.js | 12 +- www/scripts/sanitizehtml.js | 5122 +++++++++++++++++++++++++++++++++++ 4 files changed, 5131 insertions(+), 7 deletions(-) create mode 100644 www/scripts/sanitizehtml.js diff --git a/package.json b/package.json index 66d3a3b..4bc7b69 100644 --- a/package.json +++ b/package.json @@ -5,10 +5,11 @@ "main": "server.js", "dependencies": { "express": "3.4.x", + "sanitize-html": "^1.27.4", "socket.io": "0.9.x" }, "engines": { "node": "0.10.x", "npm": "1.2.x" } -} \ No newline at end of file +} diff --git a/www/index.html b/www/index.html index a63719b..bb14ad8 100644 --- a/www/index.html +++ b/www/index.html @@ -47,6 +47,7 @@

HiChat :)

+ +