Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

fix: Fixes initializing cached keys.

damencho990d21038ee8
diff --git a/resources/prosody-plugins/mod_rate_limit.lua b/resources/prosody-plugins/mod_rate_limit.lua
index 7a2cbd22ab..87dcc6b580 100644
--- a/resources/prosody-plugins/mod_rate_limit.lua
+++ b/resources/prosody-plugins/mod_rate_limit.lua
@@ -125,10 +125,10 @@ local function throttle_session(session)
if not session.jitsi_throttle then
if (session.conn and session.conn.setlimit) then
-- TODO: we don't have a mechanism to unthrottle a session in this case.
- module:log("info", "Enabling throttle (%s bytes/s) via setlimit, session=%s, ip=%s.", config.session_rate, session, session.ip);
+ module:log("info", "Enabling throttle (%s bytes/s) via setlimit, session=%s, ip=%s.", config.session_rate, session.id, session.ip);
session.conn:setlimit(config.session_rate);
else
- module:log("info", "Enabling throttle (%s bytes/s) via filter, session=%s, ip=%s.", config.session_rate, session, session.ip);
+ module:log("info", "Enabling throttle (%s bytes/s) via filter, session=%s, ip=%s.", config.session_rate, session.id, session.ip);
session.jitsi_throttle = new_throttle(config.session_rate, 2);
filters.add_filter(session, "bytes/in", limit_bytes_in, 1000);
-- throttle.start used for stop throttling after the timeout
diff --git a/resources/prosody-plugins/token/util.lib.lua b/resources/prosody-plugins/token/util.lib.lua
index 1a776d1042..98605331d1 100644
--- a/resources/prosody-plugins/token/util.lib.lua
+++ b/resources/prosody-plugins/token/util.lib.lua
@@ -120,6 +120,7 @@ function Util.new(module)
end
if self.cacheKeysUrl then
+ self.cachedKeys = {};
local update_keys_cache;
update_keys_cache = async.runner(function (name)
content, code, cache_for = http_get_with_retry(self.cacheKeysUrl, nr_retries);