如何解决此jquery安全警报:“您的应用包含一个或多个存在已知安全问题的库”

问题描述 投票:2回答:1

在我的Play开发者控制台中,我在商店中看到几个Apache Cordova应用程序的以下消息:

安全警报

您的应用包含一个或多个已知的库安全问题。请参阅以下Google帮助中心文章:细节。易受攻击的JavaScript库:

/ javascripts / jquery 1.8.2

SNYK-npm:jquery:20110606

SNYK-npm:jquery:20150627

SNYK-JS-JQUERY-174006

Chrome中的开发人员工具提供了有关该问题的详细信息。 jquery.jsjquery.foundation.topbar.js文件是罪魁祸首:

jQuery.Deferred exception: $(...).die is not a function TypeError: $(...).die is not a function
    at HTMLDocument.<anonymous> (file:///Users.../www/javascripts/jquery.foundation.topbar.js:45:40)
    at Function.each (file:///Users/.../www/javascripts/jquery.js:2:2777)
    at k.fn.init.each (file:///Users/.../www/javascripts/jquery.js:2:1419)
    at k.fn.init.init (file:///Users/.../www/javascripts/jquery.foundation.topbar.js:21:21)
    at k.fn.init.$.fn.foundationTopBar (file:///Users/.../www/javascripts/jquery.foundation.topbar.js:152:27)
    at HTMLDocument.<anonymous> (file:///Users/.../www/javascripts/app.js:12:44)
    at e (file:///Users/.../www/javascripts/jquery.js:2:29453)
    at t (file:///Users/.../www/javascripts/jquery.js:2:29755) undefined

我用jquery 3.4.1覆盖了/javascripts/jquery.js v1.8.2代码(测试了完整版和苗条版)–现在是我的2010 Zurb Foundation topbar功能(在顶部用作窄屏导航) )不起作用。 (宽屏左侧导航列表确实有效。)

当我去下载Foundation 6精简版时,仅选择topbar功能,下载中不包含topbar文件。看起来这将是一个混乱的更新。

关于如何进行这项工作的任何建议?

新:基于以下内容,没有向后兼容性:https://foundation.zurb.com/forum/posts/44018-documentation-for-upgrade-from-foundation-5-to-6

javascript jquery cordova zurb-foundation
1个回答
0
投票

该安全警报的解决方法,而不是针对该旧版本的JQuery本身的修复-加密文件? cordova plugins add cordova-plugin-crypto-file

© www.soinside.com 2019 - 2024. All rights reserved.