From 5da4e43e509bd755f4d1e6a42da86a86c0f1d305 Mon Sep 17 00:00:00 2001 From: Hristo Terezov Date: Fri, 1 Nov 2019 13:24:52 +0000 Subject: [PATCH] fix(settings): respect configWhitelist --- react/features/base/config/index.js | 1 + react/features/base/settings/functions.any.js | 15 ++++++++------- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/react/features/base/config/index.js b/react/features/base/config/index.js index 969667b3a4..4057a3ed68 100644 --- a/react/features/base/config/index.js +++ b/react/features/base/config/index.js @@ -1,5 +1,6 @@ export * from './actions'; export * from './actionTypes'; +export { default as CONFIG_WHITELIST } from './configWhitelist'; export * from './functions'; import './middleware'; diff --git a/react/features/base/settings/functions.any.js b/react/features/base/settings/functions.any.js index 5cf108e61d..55a30b72dc 100644 --- a/react/features/base/settings/functions.any.js +++ b/react/features/base/settings/functions.any.js @@ -1,6 +1,5 @@ // @flow - -import { parseURLParams } from '../config'; +import { CONFIG_WHITELIST, parseURLParams } from '../config'; import { toState } from '../redux'; import { DEFAULT_SERVER_URL } from './constants'; @@ -55,12 +54,14 @@ export function getPropertyValue( // urlParams if (sources.urlParams) { - const urlParams - = parseURLParams(state['features/base/connection'].locationURL); - const value = urlParams[`config.${propertyName}`]; + if (CONFIG_WHITELIST.indexOf(propertyName) !== -1) { + const urlParams + = parseURLParams(state['features/base/connection'].locationURL); + const value = urlParams[`config.${propertyName}`]; - if (typeof value !== 'undefined') { - return value; + if (typeof value !== 'undefined') { + return value; + } } }