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: token util better logging for timeouts, verification
Aaron van Meertene439d065b7ca
diff --git a/resources/prosody-plugins/token/util.lib.lua b/resources/prosody-plugins/token/util.lib.luaindex 5d7284bc70..e2a29cb085 100644--- a/resources/prosody-plugins/token/util.lib.lua+++ b/resources/prosody-plugins/token/util.lib.lua@@ -152,7 +152,10 @@ function Util:get_public_key(keyId)-- TODO: This check is racey. Not likely to be a problem, but we should-- still stick a mutex on content / code at some point.if code == nil then- http.destroy_request(request);+ module:log("warn", "Timeout %s seconds fetching public key from: %s",http_timeout,keyurl);+ if http.destroy_request then+ http.destroy_request(request);+ enddone();endend@@ -175,6 +178,7 @@ end-- @param 'iss' claim from the token to verify-- @return nil and error string or true for accepted claimfunction Util:verify_issuer(issClaim)+ module:log("debug","verify_issuer claim: %s against accepted: %s",issClaim, self.acceptedIssuers);for i, iss in ipairs(self.acceptedIssuers) doif issClaim == iss then--claim matches an accepted issuer so return success@@ -189,6 +193,7 @@ end-- @param 'aud' claim from the token to verify-- @return nil and error string or true for accepted claimfunction Util:verify_audience(audClaim)+ module:log("debug","verify_audience claim: %s against accepted: %s",audClaim, self.acceptedAudiences);for i, aud in ipairs(self.acceptedAudiences) doif aud == '*' then--* indicates to accept any audience in the claims so return success