This project is read-only.

Certain Base64-Encoded Attachments Throwing Exceptions

Mar 10, 2010 at 8:52 PM

Certain Base64-encoded attachments throw exceptions of "invalid length", due to extra spaces in the Base64 string.

A solution for this is to replace the following line in MessagePartProcessor.ProcessResult()...

byte[] bdata = Convert.FromBase64String(sb.ToString().Trim().TrimEnd(')'));

with this...

string binaryStringToDecrypt = sb.ToString().Replace(" ", "+").Trim().TrimEnd(')');
byte[] bdata = Convert.FromBase64String(binaryStringToDecrypt);



Mar 26, 2010 at 1:29 PM
thanks for providing a fix for that issue. i will incorporate this into the codebase.