浏览代码

Skips some url parameters that can inject scripts.

master
damencho 9 年前
父节点
当前提交
d65479abc9
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6
    0
      modules/config/URLProcessor.js

+ 6
- 0
modules/config/URLProcessor.js 查看文件

36
             if (key.indexOf("config.") === 0) {
36
             if (key.indexOf("config.") === 0) {
37
                 confObj = configJSON.config;
37
                 confObj = configJSON.config;
38
                 confKey = key.substr("config.".length);
38
                 confKey = key.substr("config.".length);
39
+
40
+                // prevent passing some parameters which can inject scripts
41
+                if (confKey === 'analyticsScriptUrl'
42
+                    || confKey === 'callStatsCustomScriptUrl')
43
+                    continue;
44
+
39
             } else if (key.indexOf("interfaceConfig.") === 0) {
45
             } else if (key.indexOf("interfaceConfig.") === 0) {
40
                 confObj = configJSON.interfaceConfig;
46
                 confObj = configJSON.interfaceConfig;
41
                 confKey = key.substr("interfaceConfig.".length);
47
                 confKey = key.substr("interfaceConfig.".length);

正在加载...
取消
保存