Security upgrades

This commit is contained in:
2020-07-15 19:54:48 +02:00
parent 59cc6c54cd
commit ad8ed283d2
3164 changed files with 408897 additions and 28 deletions

55
node_modules/string-sanitizer/index.js generated vendored Normal file
View File

@@ -0,0 +1,55 @@
"use strict";
exports.sanitize = function(str) {
return str.replace(/[^a-zA-Z0-9]/g, "");
};
exports.sanitize.keepUnicode = function(str) {
return str.replace(/[`~!@#$%^&*()_|+\-=?;:'",.<>\{\}\[\]\\\/]/gi, "");
};
exports.sanitize.keepSpace = function(str) {
var str2 = str.replace(/[`~!@#$%^&*()_|+\-=?;:'",.<>\{\}\[\]\\\/]/gi, "");
return str2.replace(/ /g, " ");
};
exports.sanitize.addFullstop = function(str) {
var str2 = str.replace(/[`~!@#$%^&*()_|+\-=?;:'",.<>\{\}\[\]\\\/]/gi, "");
return str2.replace(/ /g, ".");
};
exports.sanitize.addUnderscore = function(str) {
var str2 = str.replace(/[`~!@#$%^&*()_|+\-=?;:'",.<>\{\}\[\]\\\/]/gi, "");
return str2.replace(/ /g, "_");
};
exports.sanitize.addDash = function(str) {
var str2 = str.replace(/[`~!@#$%^&*()_|+\-=?;:'",.<>\{\}\[\]\\\/]/gi, "");
return str2.replace(/ /g, "-");
};
exports.sanitize.removeNumber = function(str) {
return str.replace(/[^a-zA-Z]/g, "");
};
exports.sanitize.keepNumber = function(str) {
return str.replace(/[^a-zA-Z0-9]/g, "");
};
// Add Fullstop, Underscore & Dash without sanitizing
exports.addFullstop = function(str) {
return str.replace(/ /g, ".");
};
exports.addUnderscore = function(str) {
return str.replace(/ /g, "_");
};
exports.addDash = function(str) {
return str.replace(/ /g, "-");
};
// Remove Space without sanitizing
exports.removeSpace = function(str) {
return str.replace(/\s+/g, "");
};