fix password censoring breaking post data
This commit is contained in:
@@ -385,7 +385,7 @@ class WTVShared {
|
|||||||
return obj.substr(0, 6) + ('*').repeat(9);
|
return obj.substr(0, 6) + ('*').repeat(9);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
var newobj = this.v8.deserialize(this.v8.serialize(obj));
|
var newobj = Object.assign({}, obj);
|
||||||
if (obj.post_data) newobj.post_data = obj.post_data;
|
if (obj.post_data) newobj.post_data = obj.post_data;
|
||||||
if (newobj["wtv-client-serial-number"]) {
|
if (newobj["wtv-client-serial-number"]) {
|
||||||
var ssid = newobj["wtv-client-serial-number"];
|
var ssid = newobj["wtv-client-serial-number"];
|
||||||
@@ -407,7 +407,7 @@ class WTVShared {
|
|||||||
filterRequestLog(obj) {
|
filterRequestLog(obj) {
|
||||||
if (this.minisrv_config.config.filter_passwords_in_logs === true) {
|
if (this.minisrv_config.config.filter_passwords_in_logs === true) {
|
||||||
if (obj.query) {
|
if (obj.query) {
|
||||||
var newobj = this.v8.deserialize(this.v8.serialize(obj));
|
var newobj = Object.assign({}, obj);
|
||||||
if (obj.post_data) newobj.post_data = obj.post_data;
|
if (obj.post_data) newobj.post_data = obj.post_data;
|
||||||
Object.keys(newobj.query).forEach(function (k) {
|
Object.keys(newobj.query).forEach(function (k) {
|
||||||
var key = k.toLowerCase();
|
var key = k.toLowerCase();
|
||||||
@@ -430,6 +430,7 @@ class WTVShared {
|
|||||||
// complex, to filter
|
// complex, to filter
|
||||||
var post_obj = {};
|
var post_obj = {};
|
||||||
post_obj.query = [];
|
post_obj.query = [];
|
||||||
|
try {
|
||||||
var post_text = obj.post_data.toString(this.CryptoJS.enc.Utf8);
|
var post_text = obj.post_data.toString(this.CryptoJS.enc.Utf8);
|
||||||
if (post_text.length > 0) {
|
if (post_text.length > 0) {
|
||||||
post_text = post_text.split("&");
|
post_text = post_text.split("&");
|
||||||
@@ -441,6 +442,9 @@ class WTVShared {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} catch (e) {
|
||||||
|
|
||||||
|
}
|
||||||
var post_obj = this.filterRequestLog(post_obj);
|
var post_obj = this.filterRequestLog(post_obj);
|
||||||
post_text = "";
|
post_text = "";
|
||||||
Object.keys(post_obj.query).forEach(function (k) {
|
Object.keys(post_obj.query).forEach(function (k) {
|
||||||
|
|||||||
Reference in New Issue
Block a user