mirror of
https://github.com/tenrok/axios.git
synced 2026-06-05 16:42:32 +03:00
841466416b
* Fix XSS logic that matched some valid urls, e.g. "/one/?foo=bar", when it shouldn't match those
8 lines
170 B
JavaScript
8 lines
170 B
JavaScript
'use strict';
|
|
|
|
module.exports = function isValidXss(requestURL) {
|
|
var xssRegex = /(\b)(on\w+)=|javascript|(<\s*)(\/*)script/gi;
|
|
return xssRegex.test(requestURL);
|
|
};
|
|
|