Handle success SASL messages containing equals sign

More strict conformance to RFC 6120 § 6.4.6, correctly handle
success SASL message which consists of a single equals sign.
Fixes SMACK-737.
This commit is contained in:
Andrey Prokopenko 2016-08-29 15:02:58 +02:00 committed by Florian Schmaus
parent 98bacb144d
commit 2b83decc89
1 changed files with 1 additions and 1 deletions

View File

@ -250,7 +250,7 @@ public abstract class SASLMechanism implements Comparable<SASLMechanism> {
* @throws InterruptedException
*/
public final void challengeReceived(String challengeString, boolean finalChallenge) throws SmackException, NotConnectedException, InterruptedException {
byte[] challenge = Base64.decode(challengeString);
byte[] challenge = Base64.decode((challengeString != null && challengeString.equals("=")) ? "" : challengeString);
byte[] response = evaluateChallenge(challenge);
if (finalChallenge) {
return;