baomitu.com的文件可能是修改过的
Opened this issue · 6 comments
lvzhenbo commented
https://lib.baomitu.com/jquery/2.1.4/jquery.min.js
https://code.jquery.com/jquery-2.1.4.min.js
现在资源加载可以添加hash,如果文件修改过hash不一致会被浏览器拦截
jingjingxyk commented
看到第一眼认为是供应链投毒,详见这个: https://v2ex.com/t/1056428
经过下面的验证,排除供应链投毒
jingjingxyk commented
验证脚本
curl -LSso /tmp/jquery.min.js https://code.jquery.com/jquery-2.1.4.min.js && md5sum /tmp/jquery.min.js
curl -LSso /tmp/baomitu-jquery.min.js https://lib.baomitu.com/jquery/2.1.4/jquery.min.js && md5sum /tmp/baomitu-jquery.min.js
curl -LSso /tmp/cloudflare-jquery.min.js https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js && md5sum /tmp/cloudflare-jquery.min.js
curl -LSo /tmp/fastly-jsdelivr-jquery.min.js https://fastly.jsdelivr.net/npm/jquery@2.1.4/dist/jquery.min.js && md5sum /tmp/fastly-jsdelivr-jquery.min.js
curl -LSo /tmp/google-jquery.min.js https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js && md5sum /tmp/google-jquery.min.js
源主机 | hash(md5) | 源地址 |
---|---|---|
code.jquery.com | f9c7afd05729f10f55b689f36bb20172 | https://code.jquery.com/jquery-2.1.4.min.js |
ajax.googleapis.com | 4a356126b9573eb7bd1e9a7494737410 | https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js |
fastly.jsdelivr.net | 4a356126b9573eb7bd1e9a7494737410 | https://fastly.jsdelivr.net/npm/jquery@2.1.4/dist/jquery.min.js |
cdnjs.cloudflare.com | 4a356126b9573eb7bd1e9a7494737410 | https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js |
lib.baomitu.com | 4a356126b9573eb7bd1e9a7494737410 | https://lib.baomitu.com/jquery/2.1.4/jquery.min.js |
结论并没啥问题
jingjingxyk commented
lvzhenbo commented
所以我觉得应该删除涉嫌修改源文件的cdn,因为这就不是cdn了
jingjingxyk commented
lvzhenbo commented
嗯。。。我看到了jq官网少了一行这个
//# sourceMappingURL=jquery.min.map