SASL: don't prefer PLAIN auth over DIGEST-MD5 for nimbuzz.com

This commit is contained in:
Daniel Gultsch 2017-11-05 16:21:59 +01:00
parent 8f0cd86090
commit 435d1ef5bd
2 changed files with 11 additions and 1 deletions

View File

@ -0,0 +1,10 @@
package eu.siacs.conversations.ui.widget;
import android.text.style.ReplacementSpan;
/**
* Created by daniel on 11/4/17.
*/
public class ZeroWidthSpan extends ReplacementSpan {
}

View File

@ -896,7 +896,7 @@ public class XmppConnection implements Runnable {
saslMechanism = new ScramSha256(tagWriter, account, mXmppConnectionService.getRNG()); saslMechanism = new ScramSha256(tagWriter, account, mXmppConnectionService.getRNG());
} else if (mechanisms.contains("SCRAM-SHA-1")) { } else if (mechanisms.contains("SCRAM-SHA-1")) {
saslMechanism = new ScramSha1(tagWriter, account, mXmppConnectionService.getRNG()); saslMechanism = new ScramSha1(tagWriter, account, mXmppConnectionService.getRNG());
} else if (mechanisms.contains("PLAIN")) { } else if (mechanisms.contains("PLAIN") && !account.getJid().getDomainpart().equals("nimbuzz.com")) {
saslMechanism = new Plain(tagWriter, account); saslMechanism = new Plain(tagWriter, account);
} else if (mechanisms.contains("DIGEST-MD5")) { } else if (mechanisms.contains("DIGEST-MD5")) {
saslMechanism = new DigestMd5(tagWriter, account, mXmppConnectionService.getRNG()); saslMechanism = new DigestMd5(tagWriter, account, mXmppConnectionService.getRNG());