开发者

Insecure '^' jshint issue

I am getting this jshint error "Insecure '^'" from this line of javascript:

var test = content.replace(/d=([^&]*)/, 'd=test');

Anyone know how I can res开发者_运维知识库olve this issue?


Check Tolerate . and [^...]. in /RegExp/.

true if . and [^...] should be allowed in RegExp literals. They match more material than might be expected, allowing attackers to confuse applications. These forms should not be used when validating in secure applications.

Source.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜