Normalizing subdomain when checking JWTs; similar to room.

This commit is contained in:
jmacelroy 2019-02-01 13:19:33 -06:00
parent 53c232fd76
commit 573cc64fcd
1 changed files with 2 additions and 2 deletions

View File

@ -379,7 +379,7 @@ function Util:verify_room(session, room_address)
end
return room_address_to_verify == jid.join(
"["..subdomain_to_check.."]"..string.lower(room_to_check), self.muc_domain);
"["..string.lower(subdomain_to_check).."]"..string.lower(room_to_check), self.muc_domain);
else
if auth_domain == '*' then
-- check for wildcard in JWT claim, allow access if found
@ -391,7 +391,7 @@ function Util:verify_room(session, room_address)
-- we do not have a domain part (multidomain is not enabled)
-- verify with info from the token
return room_address_to_verify == jid.join(
string.lower(room_to_check), subdomain_to_check);
string.lower(room_to_check), string.lower(subdomain_to_check));
end
end