开发者

Insecure '^' jshint issue

开发者 https://www.devze.com 2023-04-01 21:48 出处:网络
I am getting this jshint error \"Insecure \'^\'\" from this line of javascript: var test = content.replace(/d=([^&]*)/, \'d=test\');

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

精彩评论

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