Allow both regex and normal check for the room name
This commit is contained in:
parent
724391648e
commit
27481f0270
|
@ -304,6 +304,9 @@ function Util:process_and_verify_token(session, acceptedIssuers)
|
||||||
-- Binds any features details to the session
|
-- Binds any features details to the session
|
||||||
session.jitsi_meet_context_features = claims["context"]["features"];
|
session.jitsi_meet_context_features = claims["context"]["features"];
|
||||||
end
|
end
|
||||||
|
if claims["context"]["room"] ~= nil then
|
||||||
|
session.jitsi_meet_context_room = claims["context"]["room"]
|
||||||
|
end
|
||||||
end
|
end
|
||||||
return true;
|
return true;
|
||||||
else
|
else
|
||||||
|
@ -370,12 +373,17 @@ function Util:verify_room(session, room_address)
|
||||||
room_to_check = room_node;
|
room_to_check = room_node;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
-- no wildcard, so check room against authorized room regex from the token
|
-- no wildcard, so check room against authorized room from the token
|
||||||
if target_room ~= nil then
|
if session.jitsi_meet_context_room and (session.jitsi_meet_context_room["regex"] == true or session.jitsi_meet_context_room["regex"] == "true") then
|
||||||
-- room with subdomain
|
if target_room ~= nil then
|
||||||
room_to_check = target_room:match(auth_room);
|
-- room with subdomain
|
||||||
|
room_to_check = target_room:match(auth_room);
|
||||||
|
else
|
||||||
|
room_to_check = room_node:match(auth_room);
|
||||||
|
end
|
||||||
else
|
else
|
||||||
room_to_check = room_node:match(auth_room);
|
-- not a regex
|
||||||
|
room_to_check = auth_room;
|
||||||
end
|
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 then
|
if not room_to_check then
|
||||||
|
|
Loading…
Reference in New Issue