mirror of
https://github.com/dawidd6/action-send-mail.git
synced 2026-10-09 09:59:45 +07:00
node_modules: update (#338)
Co-authored-by: dawidd6 <9713907+dawidd6@users.noreply.github.com>
This commit is contained in:
1 parent
e1936242ed
commit
a9c5eb6c35
39 files changed
+799
-388
No files matched your search
+25
-8
@@ -90,13 +90,22 @@ class DKIMSigner {
|
||||
return;
|
||||
}
|
||||
const key = this.keys[keyPos++];
|
||||
const dkimField = (0, sign_js_1.default)(this.headers, this.hashAlgo, this.bodyHash, {
|
||||
domainName: key.domainName,
|
||||
keySelector: key.keySelector,
|
||||
privateKey: key.privateKey,
|
||||
headerFieldNames: this.options.headerFieldNames,
|
||||
skipFields: this.options.skipFields
|
||||
});
|
||||
let dkimField;
|
||||
try {
|
||||
dkimField = (0, sign_js_1.default)(this.headers, this.hashAlgo, this.bodyHash, {
|
||||
domainName: key.domainName,
|
||||
keySelector: key.keySelector,
|
||||
privateKey: key.privateKey,
|
||||
headerFieldNames: this.options.headerFieldNames,
|
||||
skipFields: this.options.skipFields
|
||||
});
|
||||
}
|
||||
catch (err) {
|
||||
this.hasErrored = true;
|
||||
this.cleanup();
|
||||
this.output.emit('error', err);
|
||||
return;
|
||||
}
|
||||
if (dkimField) {
|
||||
this.output.write(Buffer.from(dkimField + '\r\n'));
|
||||
}
|
||||
@@ -196,7 +205,15 @@ class DKIM {
|
||||
}
|
||||
const signer = new DKIMSigner(options, this.keys, inputStream, output);
|
||||
setImmediate(() => {
|
||||
signer.signStream();
|
||||
try {
|
||||
signer.signStream();
|
||||
}
|
||||
catch (_E) {
|
||||
// the body hash is created here, an unknown hashAlgo throws inside this timer
|
||||
// where nothing else could catch it
|
||||
output.emit('error', sign_js_1.default.unsupportedHashAlgoError(signer.hashAlgo));
|
||||
return;
|
||||
}
|
||||
if (writeValue) {
|
||||
setImmediate(() => {
|
||||
inputStream.end(writeValue);
|
||||
|
||||
Reference in new issue
Block a user