Normalizing subdomain when checking JWTs; similar to room.
This commit is contained in:
parent
53c232fd76
commit
573cc64fcd
|
@ -379,7 +379,7 @@ function Util:verify_room(session, room_address)
|
||||||
end
|
end
|
||||||
|
|
||||||
return room_address_to_verify == jid.join(
|
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
|
else
|
||||||
if auth_domain == '*' then
|
if auth_domain == '*' then
|
||||||
-- check for wildcard in JWT claim, allow access if found
|
-- 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)
|
-- we do not have a domain part (multidomain is not enabled)
|
||||||
-- verify with info from the token
|
-- verify with info from the token
|
||||||
return room_address_to_verify == jid.join(
|
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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue