Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我从这行 javascript 中得到了这个 jshint 错误“Insecure '^'”:
var test = content.replace(/d=([^&]*)/, 'd=test');
有谁知道我该如何解决这个问题?
检查容忍。和 [^...]。在 /RegExp/中。
真如果。并且 [^...] 应该在 RegExp 文字中被允许。它们匹配的材料比预期的要多,从而使攻击者能够混淆应用程序。在安全应用程序中进行验证时,不应使用这些表单。
来源。