1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-12-22 20:47:57 +01:00

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

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;