diff --git a/README.md b/README.md index 792021ab..111791cf 100644 --- a/README.md +++ b/README.md @@ -124,9 +124,9 @@ $ apt install -y software-properties-common $ add-apt-repository ppa:deadsnakes/ppa $ apt update $ apt install -y python3.8 python3-pip -# NodeJS 16.X and npm +# NodeJS 18.X and npm $ apt install -y curl dirmngr apt-transport-https lsb-release ca-certificates -$ curl -sL https://deb.nodesource.com/setup_16.x | bash - +$ curl -sL https://deb.nodesource.com/setup_18.x | bash - $ apt-get install -y nodejs $ npm install -g npm@latest ``` diff --git a/app/src/Server.js b/app/src/Server.js index f9e43cd3..bfed6fa2 100644 --- a/app/src/Server.js +++ b/app/src/Server.js @@ -514,6 +514,11 @@ function startServer() { // #################################################### io.on('connection', (socket) => { + socket.on('clientError', (error) => { + log.error('Client error', error); + socket.destroy(); + }); + socket.on('createRoom', async ({ room_id }, callback) => { socket.room_id = room_id; diff --git a/app/src/XSS.js b/app/src/XSS.js index 2b24ae7c..45044834 100644 --- a/app/src/XSS.js +++ b/app/src/XSS.js @@ -39,7 +39,7 @@ const checkXSS = (dataObject) => { log.debug('XSS String sanitization done'); return xss(dataObject); } - log.warn('XSS not sanitized', dataObject); + log.debug('XSS not sanitized', dataObject); return dataObject; } catch (error) { log.error('XSS error', { data: dataObject, error: error }); diff --git a/public/js/RoomClient.js b/public/js/RoomClient.js index b4469a29..9e2abc2e 100644 --- a/public/js/RoomClient.js +++ b/public/js/RoomClient.js @@ -663,7 +663,8 @@ class RoomClient { function () { console.log('Connected to signaling server!'); this._isConnected = true; - location.reload(); + // location.reload(); + getPeerName() ? location.reload() : openURL(this.getDirectJoinURL()); }.bind(this), ); @@ -701,6 +702,10 @@ class RoomClient { }); } + getDirectJoinURL() { + return `${window.location.origin}/join?room=${this.room_id}&password=${this.RoomPassword}&name=${this.peer_name}&audio=${this.peer_info.peer_audio}&video=${this.peer_info.peer_video}&screen=${this.peer_info.peer_screen}¬ify=0`; + } + // #################################################### // CHECK USER // ####################################################