Skip to content

Commit

Permalink
Add scroll
Browse files Browse the repository at this point in the history
  • Loading branch information
ZeroCho committed Jan 16, 2020
1 parent 45bbe1a commit ad4f75a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/helpers/isValidXss.js
@@ -1,7 +1,7 @@
'use strict';

module.exports = function isValidXss(requestURL) {
var xssEventRegex = /(\b)on(click|error|load|mouse\w+|key\w+|focus\w?|blur|change|input|drag\w?|resize|dbclick|contextmenu|drop|select|message)=/
var xssEventRegex = /(\b)on(click|error|load|mouse\w+|key\w+|focus\w?|blur|change|input|drag\w?|resize|dbclick|contextmenu|drop|select|message|scroll)=/;
var xssJSRegex = /javascript|(<\s*)(\/*)script/gi;
return xssJSRegex.test(requestURL) || xssEventRegex.test(requestURL);
};
Expand Down

0 comments on commit ad4f75a

Please sign in to comment.