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
Fixes using public key to verify tokens.
damencho34be638fca11
diff --git a/resources/prosody-plugins/token/util.lib.lua b/resources/prosody-plugins/token/util.lib.luaindex a726d401c4..a486a43e3b 100644--- a/resources/prosody-plugins/token/util.lib.lua+++ b/resources/prosody-plugins/token/util.lib.lua@@ -149,9 +149,10 @@ end--- Verifies token-- @param token the token to verify+-- @param secret the secret to use to verify token-- @return nil and error or the extracted claims from the token-function Util:verify_token(token)- local claims, err = jwt.decode(token, self.appSecret, true);+function Util:verify_token(token, secret)+ local claims, err = jwt.decode(token, secret, true);if claims == nil thenreturn nil, err;end@@ -217,9 +218,9 @@ function Util:process_and_verify_token(session)-- now verify the whole tokenlocal claims, msg;if self.asapKeyServer then- claims, msg = self:verify_token(session.auth_token);+ claims, msg = self:verify_token(session.auth_token, pubKey);else- claims, msg = self:verify_token(session.auth_token);+ claims, msg = self:verify_token(session.auth_token, self.appSecret);endif claims ~= nil then-- Binds room name to the session which is later checked on MUC join