mirror of
https://github.com/dawidd6/action-send-mail.git
synced 2026-10-19 14:04:32 +07:00
node_modules: update (#349)
Co-authored-by: dawidd6 <9713907+dawidd6@users.noreply.github.com>
This commit is contained in:
1 parent
9d0c26ec8b
commit
0a1f5db16c
36 files changed
+1934
-648
No files matched your search
+16
-1
@@ -76,6 +76,21 @@ function isPartialResponse(str) {
|
||||
function isPartialLine(line) {
|
||||
return /^\d+-/.test(line);
|
||||
}
|
||||
/**
|
||||
* The log form of a command a custom authentication handler sends. Such a command carries
|
||||
* the credentials in whatever shape its mechanism uses, so only an AUTH verb with its
|
||||
* mechanism name is kept, the way the built-in mechanisms hide their own secrets.
|
||||
*
|
||||
* @param cmd Command the handler sends
|
||||
* @return What the transaction log gets instead
|
||||
*/
|
||||
function maskAuthCommand(cmd) {
|
||||
const match = (cmd || '').toString().match(/^AUTH\s+[^\s]+/i);
|
||||
if (!match) {
|
||||
return '/* secret */';
|
||||
}
|
||||
return match[0].length === cmd.length ? cmd : match[0] + ' /* secret */';
|
||||
}
|
||||
/**
|
||||
* Generates a SMTP connection object
|
||||
*
|
||||
@@ -563,7 +578,7 @@ class SMTPConnection extends EventEmitter {
|
||||
}
|
||||
done(null, data);
|
||||
});
|
||||
setImmediate(() => this._sendCommand(cmd));
|
||||
setImmediate(() => this._sendCommand(cmd, maskAuthCommand(cmd)));
|
||||
return promise;
|
||||
};
|
||||
const handlerResponse = handler({
|
||||
|
||||
Reference in new issue
Block a user