From 2c9fc8b9977f35ab79ca057e297e7bd25a087ad4 Mon Sep 17 00:00:00 2001 From: Jesse Vincent Date: Sun, 20 Dec 2009 06:14:04 +0000 Subject: [PATCH] Backwards compatibility for the CRAM-MD5 implementation --- src/com/fsck/k9/mail/store/ImapStore.java | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/com/fsck/k9/mail/store/ImapStore.java b/src/com/fsck/k9/mail/store/ImapStore.java index c989df2a8..07a436ae6 100644 --- a/src/com/fsck/k9/mail/store/ImapStore.java +++ b/src/com/fsck/k9/mail/store/ImapStore.java @@ -158,9 +158,18 @@ public class ImapStore extends Store if (uri.getUserInfo() != null) { String[] userInfoParts = uri.getUserInfo().split(":"); - mAuthType = AuthType.valueOf(userInfoParts[0]); - mUsername = userInfoParts[1]; - mPassword = userInfoParts[2]; + if (userInfoParts.length == 2) + { + mAuthType = AuthType.PLAIN; + mUsername = userInfoParts[0]; + mPassword = userInfoParts[1]; + } + else + { + mAuthType = AuthType.valueOf(userInfoParts[0]); + mUsername = userInfoParts[1]; + mPassword = userInfoParts[2]; + } } if ((uri.getPath() != null) && (uri.getPath().length() > 0))