prefer PLAIN over DIGEST-MD5

DIGEST-MD5 seems to be broken for a lot of cases (OpenFire)
switched priority of PLAIN to not cause any security errors
This commit is contained in:
Daniel Gultsch 2015-01-02 01:39:19 +01:00
parent bb3bf25523
commit 8d2f454479
2 changed files with 3 additions and 3 deletions

View File

@ -14,7 +14,7 @@ public class Plain extends SaslMechanism {
@Override
public int getPriority() {
return 0;
return 10;
}
@Override

View File

@ -576,10 +576,10 @@ public class XmppConnection implements Runnable {
auth.setAttribute("xmlns", "urn:ietf:params:xml:ns:xmpp-sasl");
if (mechanisms.contains("SCRAM-SHA-1")) {
saslMechanism = new ScramSha1(tagWriter, account, mXmppConnectionService.getRNG());
//} else if (mechanisms.contains("DIGEST-MD5")) {
// saslMechanism = new DigestMd5(tagWriter, account, mXmppConnectionService.getRNG());
} else if (mechanisms.contains("PLAIN")) {
saslMechanism = new Plain(tagWriter, account);
} else if (mechanisms.contains("DIGEST-MD5")) {
saslMechanism = new DigestMd5(tagWriter, account, mXmppConnectionService.getRNG());
}
final JSONObject keys = account.getKeys();
try {