Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
TypeScript debiandeep-videojitsijitsi-meetscalable-video-conferencessfuvideovideo-communicationvideo-conferencingwebrtc
fix: Updates docs and verification to halt joining process.
damencho0354dbe8891f
diff --git a/resources/prosody-plugins/mod_token_verification.lua b/resources/prosody-plugins/mod_token_verification.luaindex ad39557ac7..c16325c9e4 100644--- a/resources/prosody-plugins/mod_token_verification.lua+++ b/resources/prosody-plugins/mod_token_verification.lua@@ -40,6 +40,7 @@ local function load_config()endload_config();+-- verify user and whether he is allowed to join a room based on the token informationlocal function verify_user(session, stanza)log("debug", "Session token: %s, session room: %s",tostring(session.auth_token),@@ -49,7 +50,7 @@ local function verify_user(session, stanza)local user_jid = stanza.attr.from;if is_admin(user_jid) thenlog("debug", "Token not required from admin user: %s", user_jid);- return nil;+ return true;endlog("debug",@@ -64,18 +65,23 @@ local function verify_user(session, stanza)endlog("debug","allowed: %s to enter/create room: %s", user_jid, stanza.attr.to);+ return true;endmodule:hook("muc-room-pre-create", function(event)local origin, stanza = event.origin, event.stanza;log("debug", "pre create: %s %s", tostring(origin), tostring(stanza));- return verify_user(origin, stanza);+ if not verify_user(origin, stanza) then+ return true; -- Returning any value other than nil will halt processing of the event+ endend);module:hook("muc-occupant-pre-join", function(event)local origin, room, stanza = event.origin, event.room, event.stanza;log("debug", "pre join: %s %s", tostring(room), tostring(stanza));- return verify_user(origin, stanza);+ if not verify_user(origin, stanza) then+ return true; -- Returning any value other than nil will halt processing of the event+ endend);for event_name, method in pairs {