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;
|
||||
let newobj = this.cloneObj(obj); // Clone the object once at the beginning
|
||||
|
||||
if (newobj.query) {
|
||||
Object.keys(newobj.query).forEach((k) => {
|
||||
if (passwordRegex.test(k)) {
|
||||
newobj.query[k] = '*'.repeat(newobj.query[k].length);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return newobj;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user