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:
parent
bb3bf25523
commit
8d2f454479
|
@ -14,7 +14,7 @@ public class Plain extends SaslMechanism {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getPriority() {
|
public int getPriority() {
|
||||||
return 0;
|
return 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -576,10 +576,10 @@ public class XmppConnection implements Runnable {
|
||||||
auth.setAttribute("xmlns", "urn:ietf:params:xml:ns:xmpp-sasl");
|
auth.setAttribute("xmlns", "urn:ietf:params:xml:ns:xmpp-sasl");
|
||||||
if (mechanisms.contains("SCRAM-SHA-1")) {
|
if (mechanisms.contains("SCRAM-SHA-1")) {
|
||||||
saslMechanism = new ScramSha1(tagWriter, account, mXmppConnectionService.getRNG());
|
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")) {
|
} else if (mechanisms.contains("PLAIN")) {
|
||||||
saslMechanism = new Plain(tagWriter, account);
|
saslMechanism = new Plain(tagWriter, account);
|
||||||
|
} else if (mechanisms.contains("DIGEST-MD5")) {
|
||||||
|
saslMechanism = new DigestMd5(tagWriter, account, mXmppConnectionService.getRNG());
|
||||||
}
|
}
|
||||||
final JSONObject keys = account.getKeys();
|
final JSONObject keys = account.getKeys();
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in New Issue