1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-30 13:12:25 -05:00

Backwards compatibility for the CRAM-MD5 implementation

This commit is contained in:
Jesse Vincent 2009-12-20 06:14:04 +00:00
parent 3914a78b53
commit 2c9fc8b997

View File

@ -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))