potential fix for an issue regarding undefined or null
This commit is contained in:
@@ -820,11 +820,13 @@ class WTVShared {
|
|||||||
const passwordRegex = /(^pass$|passw(or)?d)/i;
|
const passwordRegex = /(^pass$|passw(or)?d)/i;
|
||||||
let newobj = this.cloneObj(obj); // Clone the object once at the beginning
|
let newobj = this.cloneObj(obj); // Clone the object once at the beginning
|
||||||
|
|
||||||
Object.keys(newobj.query).forEach((k) => {
|
if (newobj.query) {
|
||||||
if (passwordRegex.test(k)) {
|
Object.keys(newobj.query).forEach((k) => {
|
||||||
newobj.query[k] = '*'.repeat(newobj.query[k].length);
|
if (passwordRegex.test(k)) {
|
||||||
}
|
newobj.query[k] = '*'.repeat(newobj.query[k].length);
|
||||||
});
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
return newobj;
|
return newobj;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user