diff --git a/app/src/Server.js b/app/src/Server.js index ecd4a3cf..47a7d4a8 100644 --- a/app/src/Server.js +++ b/app/src/Server.js @@ -471,9 +471,14 @@ function startServer() { // Check if room active (exists) app.post(['/isRoomActive'], (req, res) => { const { roomId } = checkXSS(req.body); - const roomActive = roomList.has(roomId); - if (roomActive) log.debug('isRoomActive', { roomId, roomActive }); - res.status(200).json({ message: roomActive }); + + if (roomId && (hostCfg.protected || hostCfg.user_auth)) { + const roomActive = roomList.has(roomId); + if (roomActive) log.debug('isRoomActive', { roomId, roomActive }); + res.status(200).json({ message: roomActive }); + } else { + res.status(400).json({ message: 'Unauthorized' }); + } }); // Handle Direct join room with params @@ -2945,10 +2950,6 @@ function startServer() { return payload; } - function isRoomActive(roomId) { - return roomList.has(roomId); - } - function getActiveRooms() { const roomIds = Array.from(roomList.keys()); const roomPeersArray = roomIds.map((roomId) => { diff --git a/public/css/landing.css b/public/css/landing.css index a651eee2..e31bf8bc 100644 --- a/public/css/landing.css +++ b/public/css/landing.css @@ -2119,13 +2119,6 @@ main { # Who are you --------------------------------------------------------------*/ -#whoAreYouDiv { - display: inline-flex; -} -#roomActiveDiv { - display: none; -} - .disabled { pointer-events: none; opacity: 0.5;