mirror of
https://github.com/nodemailer/wildduck.git
synced 2025-10-03 18:35:40 +08:00
update
This commit is contained in:
parent
2c88242b30
commit
8a52635171
1 changed files with 10 additions and 5 deletions
15
api.js
15
api.js
|
@ -74,30 +74,35 @@ const serverOptions = {
|
||||||
if (!value) {
|
if (!value) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (['password'].includes(key)) {
|
if (['password'].includes(key)) {
|
||||||
value = '***';
|
value = '***';
|
||||||
} else if (value.length > 64) {
|
} else if (value.length > 64) {
|
||||||
value = value.substr(0, 63) + '…';
|
value = value.substr(0, 63) + '…';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (key.length > 30) {
|
if (key.length > 30) {
|
||||||
key = key.substr(0, 30) + '…';
|
key = key.substr(0, 30) + '…';
|
||||||
}
|
}
|
||||||
|
|
||||||
message['_req_' + key] = value;
|
message['_req_' + key] = value;
|
||||||
});
|
});
|
||||||
|
|
||||||
Object.keys(body).forEach(key => {
|
Object.keys(body).forEach(key => {
|
||||||
let value = (body[key] || '').toString().trim();
|
let value = body[key];
|
||||||
if (!value || ['success', 'error', 'code']) {
|
if (!body || !['id'].includes(key)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (['secretKey'].includes(key)) {
|
value = (value || '').toString().trim();
|
||||||
value = '***';
|
|
||||||
} else if (value.length > 64) {
|
if (value.length > 64) {
|
||||||
value = value.substr(0, 63) + '…';
|
value = value.substr(0, 63) + '…';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (key.length > 30) {
|
if (key.length > 30) {
|
||||||
key = key.substr(0, 30) + '…';
|
key = key.substr(0, 30) + '…';
|
||||||
}
|
}
|
||||||
|
|
||||||
message['_res_' + key] = value;
|
message['_res_' + key] = value;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue