Skip to content

Commit

Permalink
fix: only output new headers instead of message in case decoding/enco…
Browse files Browse the repository at this point in the history
…ding attachment errors (that customers emailed me about)
  • Loading branch information
niftylettuce committed Aug 11, 2020
1 parent 25be9e8 commit 8e9acb6
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ arcSign(message, selector, domain, privateKeyFile, srvId)
})();
```

The value of `result` is a String with the new message (with ARC signed headers added to the top).
The value of `result` is a String with the new ARC headers to add to the top of the message (if any).


## Contributors
Expand Down
1 change: 0 additions & 1 deletion scripts/arcsign.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ def main():
srv_id, cv, linesep=dkim.util.get_linesep(message))
for line in sig:
sys.stdout.write(line)
sys.stdout.write(message)
except Exception as e:
print(e, file=sys.stderr, end = '')
sys.stdout.write(message)
Expand Down
3 changes: 1 addition & 2 deletions test/arc-sign.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ test('arc sign returns none', async (t) => {
t.true(lines[0].startsWith('ARC-Seal'));
t.true(lines[1].startsWith('ARC-Message-Signature'));
t.true(lines[2].startsWith('ARC-Authentication-Results'));
t.is(none, lines.slice(3).join('\n'));
});

test('arc sign returns pass', async (t) => {
Expand All @@ -50,7 +49,7 @@ test('arc sign returns pass', async (t) => {
key,
'mx.google.com'
);
t.is(result, pass);
t.is(result, '');
});

test('arc sign throws error with missing From header', async (t) => {
Expand Down

0 comments on commit 8e9acb6

Please sign in to comment.