You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When passing authentication results like the following test.com; dkim=none (message not signed) header.d=none; test.com; dmarc=none action="none" header.from= (generated by office 365) the following line of code will throw (as opposed to parse successfully as i think it should or fail saliently and return false)
Console.WriteLine(AuthenticationResults.TryParse(Encoding.UTF8.GetBytes((string) "test.com; dkim=none (message not signed) header.d=none; test.com; dmarc=none action=\"none\" header.from="), out var a));
Platform (please complete the following information):
OS: Windows
.NET Runtime: core 3.1
MimeKit Version: tested 2.7 and 2.8
To Reproduce
Run the code sample in the description, will throw the following exception
Unhandled exception. System.IndexOutOfRangeException: Index was outside the bounds of the array.
at MimeKit.Cryptography.AuthenticationResults.SkipPropertyValue(Byte[] text, Int32& index, Int32 endIndex, Boolean& quoted)
at MimeKit.Cryptography.AuthenticationResults.TryParseMethods(Byte[] text, Int32& index, Int32 endIndex, Boolean throwOnError, AuthenticationResults authres)
at MimeKit.Cryptography.AuthenticationResults.TryParse(Byte[] text, Int32& index, Int32 endIndex, Boolean throwOnError, AuthenticationResults& authres)
at MimeKit.Cryptography.AuthenticationResults.TryParse(Byte[] buffer, AuthenticationResults& authres)
Expected behavior
Passes without error
The text was updated successfully, but these errors were encountered:
Describe the bug
When passing authentication results like the following
test.com; dkim=none (message not signed) header.d=none; test.com; dmarc=none action="none" header.from=
(generated by office 365) the following line of code will throw (as opposed to parse successfully as i think it should or fail saliently and return false)Platform (please complete the following information):
To Reproduce
Run the code sample in the description, will throw the following exception
Expected behavior
Passes without error
The text was updated successfully, but these errors were encountered: