Log if password needed url encoding
This commit is contained in:
@@ -401,11 +401,14 @@ export function getRelativeRoomUrl(
|
|||||||
): string {
|
): string {
|
||||||
// The password shouldn't need URL encoding here (we generate URL-safe ones) but encode
|
// The password shouldn't need URL encoding here (we generate URL-safe ones) but encode
|
||||||
// it in case it came from another client that generated a non url-safe one
|
// it in case it came from another client that generated a non url-safe one
|
||||||
|
const encodedPassword = password ? encodeURIComponent(password) : undefined;
|
||||||
|
if (password && encodedPassword !== password) {
|
||||||
|
logger.info("Encoded call password used non URL-safe chars: buggy client?");
|
||||||
|
}
|
||||||
|
|
||||||
return `/room/#${
|
return `/room/#${
|
||||||
roomName ? "/" + roomAliasLocalpartFromRoomName(roomName) : ""
|
roomName ? "/" + roomAliasLocalpartFromRoomName(roomName) : ""
|
||||||
}?roomId=${roomId}${
|
}?roomId=${roomId}${password ? "&" + PASSWORD_STRING + encodedPassword : ""}`;
|
||||||
password ? "&" + PASSWORD_STRING + encodeURIComponent(password) : ""
|
|
||||||
}`;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getAvatarUrl(
|
export function getAvatarUrl(
|
||||||
|
|||||||
Reference in New Issue
Block a user