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
feat: Drops some debug prints. (#14311)
Дамян Минковb6b77f55f16d
diff --git a/resources/prosody-plugins/mod_filter_iq_rayo.lua b/resources/prosody-plugins/mod_filter_iq_rayo.luaindex dafedd7438..81f7c0f920 100644--- a/resources/prosody-plugins/mod_filter_iq_rayo.lua+++ b/resources/prosody-plugins/mod_filter_iq_rayo.lua@@ -98,7 +98,7 @@ module:hook("pre-iq/full", function(event)-- now lets check any limits if configuredif limit_outgoing_calls > 0 thenif not session.dial_out_throttle then- module:log("debug", "Enabling dial-out throttle session=%s.", session);+ -- module:log("debug", "Enabling dial-out throttle session=%s.", session);session.dial_out_throttle = new_throttle(limit_outgoing_calls, OUTGOING_CALLS_THROTTLE_INTERVAL);enddiff --git a/resources/prosody-plugins/mod_muc_auth_ban.lua b/resources/prosody-plugins/mod_muc_auth_ban.luaindex 1a9d9fe980..4dac9d679e 100644--- a/resources/prosody-plugins/mod_muc_auth_ban.lua+++ b/resources/prosody-plugins/mod_muc_auth_ban.lua@@ -9,6 +9,7 @@ endlocal json = require "cjson.safe";local http = require "net.http";+local inspect = require 'inspect';local ban_check_count = module:measure("muc_auth_ban_check", "rate")local ban_check_users_banned_count = module:measure("muc_auth_ban_users_banned", "rate")@@ -38,7 +39,7 @@ local function shouldAllow(session)local token = session.auth_token;if token ~= nil then- module:log("debug", "Checking whether user should be banned ")+ -- module:log("debug", "Checking whether user should be banned ")-- cached tokens are bannedif cache:get(token) then@@ -52,7 +53,9 @@ local function shouldAllow(session)local r = json.decode(content)if r['access'] ~= nil and r['access'] == false then- module:log("debug", "user is banned")+ module:log("info", "User is banned room:%s tenant:%s user_id:%s group:%s",+ session.jitsi_meet_room, session.jitsi_web_query_prefix,+ inspect(session.jitsi_meet_context_user), session.jitsi_meet_context_group);ban_check_users_banned_count();diff --git a/resources/prosody-plugins/mod_muc_flip.lua b/resources/prosody-plugins/mod_muc_flip.luaindex 85b726b1cd..8d1a244706 100644--- a/resources/prosody-plugins/mod_muc_flip.lua+++ b/resources/prosody-plugins/mod_muc_flip.lua@@ -27,7 +27,7 @@ endlocal function remove_flip_tag(stanza)stanza:maptags(function(tag)if tag and tag.name == "flip_device" then- module:log("debug", "Removing %s tag from presence stanza!", tag.name);+ -- module:log("debug", "Removing %s tag from presence stanza!", tag.name);return nil;elsereturn tag;@@ -59,7 +59,7 @@ module:hook("muc-occupant-pre-join", function(event)local occupant_jid = stanza.attr.from;local affiliation = room:get_affiliation(occupant_jid);if not affiliation or affiliation == 'none' or affiliation == 'member' then- module:log("debug", "Bypass lobby invitee %s", occupant_jid)+ -- module:log("debug", "Bypass lobby invitee %s", occupant_jid)occupant.role = "participant";room:set_affiliation(true, jid_bare(occupant_jid), "member")room:save_occupant(occupant);@@ -95,7 +95,7 @@ module:hook("muc-occupant-pre-join", function(event)-- update authenticated participant listparticipants[id] = occupant.nick;room._data.participants_details = participants- module:log("debug", "current details list %s", inspect(participants))+ -- module:log("debug", "current details list %s", inspect(participants))elseif flip_device_tag thenmodule:log("warn", "Flip device tag present for a guest user")@@ -125,7 +125,7 @@ module:hook("muc-occupant-joined", function(event)endlocal initial_affiliation = room:get_affiliation(kicked_occupant.jid) or "member";- module:log("debug", "Transfer affiliation %s to occupant jid %s", initial_affiliation, occupant.jid)+ -- module:log("debug", "Transfer affiliation %s to occupant jid %s", initial_affiliation, occupant.jid)room:set_affiliation(true, occupant.bare_jid, initial_affiliation)if initial_affiliation == "owner" thenevent.occupant.role = "moderator";@@ -177,7 +177,7 @@ module:hook('muc-broadcast-presence', function(event)local kicked_participant_nick = event.room._data.kicked_participant_nicklocal stanza = event.stanza;if kicked_participant_nick and stanza.attr.from == kicked_participant_nick and stanza.attr.type == 'unavailable' then- module:log("debug", "Add flip_device tag for presence unavailable from occupant nick %s", kicked_participant_nick)+ -- module:log("debug", "Add flip_device tag for presence unavailable from occupant nick %s", kicked_participant_nick)stanza:tag("flip_device"):up();endend)diff --git a/resources/prosody-plugins/mod_muc_password_check.lua b/resources/prosody-plugins/mod_muc_password_check.luaindex da55c2c168..0f8bfa7049 100644--- a/resources/prosody-plugins/mod_muc_password_check.lua+++ b/resources/prosody-plugins/mod_muc_password_check.lua@@ -129,7 +129,7 @@ function handle_validate_room_password (event)body = json.encode({ valid = (room:get_password() == passcode) })};- module:log("debug","Sending response for room password validate: %s", inspect(PUT_response));+ -- module:log("debug","Sending response for room password validate: %s", inspect(PUT_response));return PUT_response;end@@ -155,7 +155,7 @@ function handle_get_room_password (event)};body = json.encode(room_details);};- module:log("debug","Sending response for room password: %s", inspect(GET_response));+ -- module:log("debug","Sending response for room password: %s", inspect(GET_response));return GET_response;enddiff --git a/resources/prosody-plugins/mod_muc_password_whitelist.lua b/resources/prosody-plugins/mod_muc_password_whitelist.luaindex b6ea6fd129..ea892e96bb 100644--- a/resources/prosody-plugins/mod_muc_password_whitelist.lua+++ b/resources/prosody-plugins/mod_muc_password_whitelist.lua@@ -46,7 +46,7 @@ module:hook("muc-occupant-pre-join", function (event)join:tag("password", { xmlns = MUC_NS }):text(room:get_password());- module:log("debug", "Applied password access whitelist for %s in room %s", event.stanza.attr.from, room.jid);+ -- module:log("debug", "Applied password access whitelist for %s in room %s", event.stanza.attr.from, room.jid);end, -7); --- Run before the password check (priority -20), runs after lobby(priority -4) and members-only (priority -5).diff --git a/resources/prosody-plugins/mod_s2soutinjection.lua b/resources/prosody-plugins/mod_s2soutinjection.luaindex b1d1b2150d..9920984fb8 100644--- a/resources/prosody-plugins/mod_s2soutinjection.lua+++ b/resources/prosody-plugins/mod_s2soutinjection.lua@@ -34,7 +34,7 @@ function proxy_listener.onconnect(conn)session.version = 1;session.sends2s = function (t)- log("debug", "sending (s2s over proxy): %s", (t.top_tag and t:top_tag()) or t:match("^[^>]*>?"));+ -- log("debug", "sending (s2s over proxy): %s", (t.top_tag and t:top_tag()) or t:match("^[^>]*>?"));if t.name thent = filter("stanzas/out", t);end@@ -73,13 +73,13 @@ module:hook("route/remote", function(event)local from_host, to_host, stanza = event.from_host, event.to_host, event.stanza;local inject = injected and injected[to_host];if not inject then return end- module:log("debug", "opening a new outgoing connection for this stanza");+ -- module:log("debug", "opening a new outgoing connection for this stanza");local host_session = new_outgoing(from_host, to_host);-- Store in bufferhost_session.bounce_sendq = bounce_sendq;host_session.sendq = { {tostring(stanza), stanza.attr.type ~= "error" and stanza.attr.type ~= "result" and st.reply(stanza)} };- host_session.log("debug", "stanza [%s] queued until connection complete", tostring(stanza.name));+ -- host_session.log("debug", "stanza [%s] queued until connection complete", tostring(stanza.name));local host, port = inject[1] or inject, tonumber(inject[2]) or 5269;diff --git a/resources/prosody-plugins/mod_secure_interfaces.lua b/resources/prosody-plugins/mod_secure_interfaces.luaindex 9816f26a56..e9849034a7 100644--- a/resources/prosody-plugins/mod_secure_interfaces.lua+++ b/resources/prosody-plugins/mod_secure_interfaces.lua@@ -11,10 +11,10 @@ module:hook("stream-features", function (event)endlocal localip = socket:getsockname();if secure_interfaces:contains(localip) then- module:log("debug", "Marking session from %s to %s as secure", session.ip or "[?]", localip);+ -- module:log("debug", "Marking session from %s to %s as secure", session.ip or "[?]", localip);session.secure = true;session.conn.starttls = false;- else- module:log("debug", "Not marking session from %s to %s as secure", session.ip or "[?]", localip);+-- else+-- module:log("debug", "Not marking session from %s to %s as secure", session.ip or "[?]", localip);endend, 2500);diff --git a/resources/prosody-plugins/mod_token_verification.lua b/resources/prosody-plugins/mod_token_verification.luaindex 4d97c618e0..8171566858 100644--- a/resources/prosody-plugins/mod_token_verification.lua+++ b/resources/prosody-plugins/mod_token_verification.lua@@ -8,6 +8,7 @@ local um_is_admin = require "core.usermanager".is_admin;local jid_split = require 'util.jid'.split;local jid_bare = require 'util.jid'.bare;+local DEBUG = false;local function is_admin(jid)return um_is_admin(jid, host);@@ -51,14 +52,15 @@ load_config();-- verify user and whether he is allowed to join a room based on the token informationlocal function verify_user(session, stanza)- module:log("debug", "Session token: %s, session room: %s",- tostring(session.auth_token),- tostring(session.jitsi_meet_room));+ if DEBUG then+ module:log("debug", "Session token: %s, session room: %s",+ tostring(session.auth_token), tostring(session.jitsi_meet_room));+ end-- token not required for admin userslocal user_jid = stanza.attr.from;if is_admin(user_jid) then- module:log("debug", "Token not required from admin user: %s", user_jid);+ if DEBUG then module:log("debug", "Token not required from admin user: %s", user_jid); endreturn true;end@@ -68,13 +70,11 @@ local function verify_user(session, stanza)-- allowlist for participantsif allowlist:contains(user_domain) or allowlist:contains(user_bare_jid) then- module:log("debug", "Token not required from user in allow list: %s", user_jid);+ if DEBUG then module:log("debug", "Token not required from user in allow list: %s", user_jid); endreturn true;end-- module:log("debug",- "Will verify token for user: %s, room: %s ", user_jid, stanza.attr.to);+ if DEBUG then module:log("debug", "Will verify token for user: %s, room: %s ", user_jid, stanza.attr.to); endif not token_util:verify_room(session, stanza.attr.to) thenmodule:log("error", "Token %s not allowed to join: %s",tostring(session.auth_token), tostring(stanza.attr.to));@@ -83,13 +83,13 @@ local function verify_user(session, stanza)stanza, "cancel", "not-allowed", "Room and token mismatched"));return false; -- we need to just return non nilend- module:log("debug", "allowed: %s to enter/create room: %s", user_jid, stanza.attr.to);+ if DEBUG then module:log("debug", "allowed: %s to enter/create room: %s", user_jid, stanza.attr.to); endreturn true;endmodule:hook("muc-room-pre-create", function(event)local origin, stanza = event.origin, event.stanza;- module:log("debug", "pre create: %s %s", tostring(origin), tostring(stanza));+ if DEBUG then module:log("debug", "pre create: %s %s", tostring(origin), tostring(stanza)); endif not verify_user(origin, stanza) thenreturn true; -- Returning any value other than nil will halt processing of the eventend@@ -97,7 +97,7 @@ end, 99);module:hook("muc-occupant-pre-join", function(event)local origin, room, stanza = event.origin, event.room, event.stanza;- module:log("debug", "pre join: %s %s", tostring(room), tostring(stanza));+ if DEBUG then module:log("debug", "pre join: %s %s", tostring(room), tostring(stanza)); endif not verify_user(origin, stanza) thenreturn true; -- Returning any value other than nil will halt processing of the eventenddiff --git a/resources/prosody-plugins/token/util.lib.lua b/resources/prosody-plugins/token/util.lib.luaindex 68b847c50c..1da59a24dc 100644--- a/resources/prosody-plugins/token/util.lib.lua+++ b/resources/prosody-plugins/token/util.lib.lua@@ -220,7 +220,7 @@ function Util:process_and_verify_token(session, acceptedIssuers)local key;if session.public_key then-- We're using an public key stored in the session- module:log("debug","Public key was found on the session");+ -- module:log("debug","Public key was found on the session");key = session.public_key;elseif self.asapKeyServer and session.auth_token ~= nil then-- We're fetching an public key from an ASAP server@@ -398,7 +398,7 @@ function Util:verify_room(session, room_address)-- not a regexroom_to_check = auth_room;end- module:log("debug", "room to check: %s", room_to_check)+ -- module:log("debug", "room to check: %s", room_to_check)if not room_to_check thenif not self.requireRoomClaim then-- if we do not require to have the room claim, and it is missingdiff --git a/resources/prosody-plugins/util.lib.lua b/resources/prosody-plugins/util.lib.luaindex 0d997c264a..928d18a479 100644--- a/resources/prosody-plugins/util.lib.lua+++ b/resources/prosody-plugins/util.lib.lua@@ -305,7 +305,7 @@ function http_get_with_retry(url, retry, auth_token)if timeout_occurred == nil thencode = code_;if code == 200 or code == 204 then- module:log("debug", "External call was successful, content %s", content_);+ -- module:log("debug", "External call was successful, content %s", content_);content = content_;-- if there is cache-control header, let's return the max-age value