From 6bed1012c993264ad976b295696266f77943929a Mon Sep 17 00:00:00 2001 From: rofl256 Date: Fri, 9 Feb 2018 00:58:35 +0100 Subject: [PATCH] replace spezial chars in username and whiteboardId --- public/js/whiteboard.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/public/js/whiteboard.js b/public/js/whiteboard.js index 947e242..8f595f2 100644 --- a/public/js/whiteboard.js +++ b/public/js/whiteboard.js @@ -33,6 +33,9 @@ var whiteboard = { for(var i in newSettings) { this.settings[i] = newSettings[i]; } + this.settings["username"] = this.settings["username"].replace(/[^0-9a-z]/gi, ''); + this.settings["whiteboardId"] = this.settings["whiteboardId"].replace(/[^0-9a-z]/gi, ''); + var startCoords = []; var svgLine = null; var svgRect = null;