Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NullReferenceException unsing IMAP and Digest-MD5 #45

Closed
ckopas opened this issue May 1, 2014 · 1 comment
Closed

NullReferenceException unsing IMAP and Digest-MD5 #45

ckopas opened this issue May 1, 2014 · 1 comment

Comments

@ckopas
Copy link

ckopas commented May 1, 2014

Hi Jeff,

I have a problem using IMAP and DIGEST-MD5 with my E-Mail Provider STRATO, because I get a NullReferenceException during authentication. If I remove the authentication mechanism "DIGEST-MD5", everything works well.

I have looked into the code and I think the problem is within the constructor of the class DigestResponse (file MailKit.Security.SaslMechanismDigestMd5.cs), because in my case the value of challenge.Realms of the parameter challenge is null. Therfore the if-statement at the beginning

if (challenge.Realms.Length > 0)

casues the exception. If I change the statement to

if ((challenge.Realms != null) && (challenge.Realms.Length > 0))

the authentication process succeed.

jstedfast added a commit that referenced this issue May 1, 2014
Fixes issue #45 (many thanks to ckopas for digging into this)
@jstedfast
Copy link
Owner

Thanks for reporting and digging into this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants