一句话:针对同一 frame 内多来源脚本共享全局命名空间导致的标识符冲突,提出检测与理解方法。
论文关注 Web 前端开发中一个常见但危险的问题:在同一浏览器 frame 中,来自不同主机的 JavaScript 脚本共享单一全局命名空间。因此,一个脚本可能读取甚至覆盖其他脚本定义的全局对象或函数,造成非预期行为。例如,某脚本可把另一脚本中的函数重新定义为对象,导致该函数被调用时抛出运行时异常。标题表明工作重点在于检测并理解这类全局标识符冲突。不过,所给摘要未说明具体采用静态分析、动态分析还是混合检测技术,也未给出实验评估与实际网站上的冲突发现结果,因此无法进一步概括其方法与关键结论。
JavaScript is widely used for implementing client-side web applications, and it is common to include JavaScript code from many different hosts. However, in a web browser, all the scripts loaded in the same frame share a single global namespace. As a result, a script may read or even overwrite the global objects or functions in other scripts, causing unexpected behaviors. For example, a script can redefine a function in a different script as an object, so that any call of that function would cause an exception at run time.
DOI 原文 ·
@inproceedings{paperbot5859,
title = {Detecting and understanding JavaScript global identifier conflicts on the web},
author = {Mingxue Zhang and Wei Meng},
booktitle = {FSE},
year = {2020},
doi = {10.1145/3368089.3409747}
}