If a body only has \r\n (empty lines) relaxed canonicalization should give an empty body.
"\r\n\r\n" should give ""
"Something\r\n\r\n" should give "Something\r\n"
but
"\r\n\r\n" gives "\r\n"
See patch
++ b/chrome/content/dkim.js
@@ -718,6 +718,10 @@ DKIM_Verifier.DKIMVerifier = (function() {
// for some reason /(\r\n)*$/ doesn't work all the time (matching only last "\r\n")
body = body.replace(/((\r\n)+)?$/,"\r\n");
// If only one \r\n rests, there were only emtpy lines.
If a body only has \r\n (empty lines) relaxed canonicalization should give an empty body.
"\r\n\r\n" should give "" "Something\r\n\r\n" should give "Something\r\n"
but
"\r\n\r\n" gives "\r\n"
See patch
++ b/chrome/content/dkim.js @@ -718,6 +718,10 @@ DKIM_Verifier.DKIMVerifier = (function() { // for some reason /(\r\n)*$/ doesn't work all the time (matching only last "\r\n") body = body.replace(/((\r\n)+)?$/,"\r\n");