Browse Source

fix(settings): respect configWhitelist

j8
Hristo Terezov 6 years ago
parent
commit
5da4e43e50

+ 1
- 0
react/features/base/config/index.js View File

@@ -1,5 +1,6 @@
1 1
 export * from './actions';
2 2
 export * from './actionTypes';
3
+export { default as CONFIG_WHITELIST } from './configWhitelist';
3 4
 export * from './functions';
4 5
 
5 6
 import './middleware';

+ 9
- 8
react/features/base/settings/functions.any.js View File

@@ -1,6 +1,5 @@
1 1
 // @flow
2
-
3
-import { parseURLParams } from '../config';
2
+import { CONFIG_WHITELIST, parseURLParams } from '../config';
4 3
 import { toState } from '../redux';
5 4
 
6 5
 import { DEFAULT_SERVER_URL } from './constants';
@@ -55,12 +54,14 @@ export function getPropertyValue(
55 54
 
56 55
     // urlParams
57 56
     if (sources.urlParams) {
58
-        const urlParams
59
-            = parseURLParams(state['features/base/connection'].locationURL);
60
-        const value = urlParams[`config.${propertyName}`];
61
-
62
-        if (typeof value !== 'undefined') {
63
-            return value;
57
+        if (CONFIG_WHITELIST.indexOf(propertyName) !== -1) {
58
+            const urlParams
59
+                = parseURLParams(state['features/base/connection'].locationURL);
60
+            const value = urlParams[`config.${propertyName}`];
61
+
62
+            if (typeof value !== 'undefined') {
63
+                return value;
64
+            }
64 65
         }
65 66
     }
66 67
 

Loading…
Cancel
Save