Skip to content

Commit

Permalink
fix: Fixes parsing hash params to be passed to tokenAuthUrl.
Browse files Browse the repository at this point in the history
The URL.hash returns the # sign, and so we always ignore the first parameter.
  • Loading branch information
damencho committed Mar 27, 2024
1 parent 79d216d commit 4759822
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions react/features/authentication/functions.any.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { IConfig } from '../base/config/configType';
import { parseURLParams } from '../base/util/parseURLParams';
import { getBackendSafeRoomName } from '../base/util/uri';

/**
Expand Down Expand Up @@ -72,13 +73,13 @@ export const _getTokenAuthState = (
state['config.startWithVideoMuted'] = true;
}

const params = new URLSearchParams(locationURL.hash);
const params = parseURLParams(locationURL, true);

for (const [ key, value ] of params) {
for (const key of Object.keys(params)) {
// we allow only config and interfaceConfig overrides in the state
if (key.startsWith('config.') || key.startsWith('interfaceConfig.')) {
// @ts-ignore
state[key] = value;
state[key] = params[key];
}
}

Expand Down

0 comments on commit 4759822

Please sign in to comment.