Closed andris9 closed 2 years ago
Perhaps use trimNewlines.end(trimNewlines.end(str.trimEnd()).trimEnd());
?
https://www.npmjs.com/package/trim-newlines https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/trimEnd
The body hash calculation operates on a stream of bytes, it does not buffer the entire body to memory, so it can not use regular string manipulation functions.
Fixed in v2.3.4
DKIM relaxed body hash calculation should trim all whitespace and newlines from the end of the email. Instead it trims starting from the last line that has at least one whitespace byte