security update (prototype pollution prevention) Object.freeze

This commit is contained in:
Sebastian Hildebrandt
2020-11-25 14:35:03 +01:00
parent f828d6ed3d
commit 44da17c851
5 changed files with 11 additions and 2 deletions
+3
View File
@@ -21,6 +21,9 @@
// Dependencies
// ----------------------------------------------------------------------------------
Object.freeze(String.prototype);
Object.freeze(Object.prototype);
const lib_version = require('../package.json').version;
const util = require('./util');
const system = require('./system');
+1 -1
View File
@@ -41,7 +41,7 @@ function inetChecksite(url, callback) {
s[i] === '{' ||
s[i] === '}')) {
const sl = s[i].toLowerCase();
if (sl[0] && !sl[1]) {
if (sl && sl[0] && !sl[1]) {
urlSanitized = urlSanitized + sl[0];
}
}