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(prosody): Adds some nil checks.
damencho2245e4e747ab
diff --git a/resources/prosody-plugins/mod_polls_component.lua b/resources/prosody-plugins/mod_polls_component.luaindex 3d2a43bdd3..514ad06ff4 100644--- a/resources/prosody-plugins/mod_polls_component.lua+++ b/resources/prosody-plugins/mod_polls_component.lua@@ -141,6 +141,11 @@ endlocal main_room = get_room_by_name_and_subdomain(session.jitsi_web_query_room, session.jitsi_web_query_prefix);local occupant_jid = stanza.attr.from;+ if not main_room then+ module:log('warn', 'No main room found for %s %s', session.jitsi_web_query_room, session.jitsi_web_query_prefix);+ return;+ end+occupant = main_room:get_occupant_by_real_jid(occupant_jid);if main_room._data.breakout_rooms_active and not occupant then@@ -148,10 +153,13 @@ end-- not in main room, let's check breakout roomsfor breakout_room_jid, subject in pairs(main_room._data.breakout_rooms or {}) dolocal breakout_room = get_room_from_jid(breakout_room_jid);- occupant = breakout_room:get_occupant_by_real_jid(occupant_jid);- if occupant then- room = breakout_room;- break;++ if breakout_room then+ occupant = breakout_room:get_occupant_by_real_jid(occupant_jid);+ if occupant then+ room = breakout_room;+ break;+ endendendelsediff --git a/resources/prosody-plugins/token/util.lib.lua b/resources/prosody-plugins/token/util.lib.luaindex 88037ad827..4db0090d59 100644--- a/resources/prosody-plugins/token/util.lib.lua+++ b/resources/prosody-plugins/token/util.lib.lua@@ -279,7 +279,9 @@ function Util:process_and_verify_token(session)-- We're fetching an public key from an ASAP serverlocal dotFirst = session.auth_token:find("%.");if not dotFirst then return false, "not-allowed", "Invalid token" end- local header, err = json_safe.decode(basexx.from_url64(session.auth_token:sub(1,dotFirst-1)));+ local headerPartEncoded = basexx.from_url64(session.auth_token:sub(1,dotFirst-1));+ if not headerPartEncoded then return false, "not-allowed", "Invalid token" end+ local header, err = json_safe.decode(headerPartEncoded);if err thenreturn false, "not-allowed", "bad token format";end