1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-29 15:32:06 +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 * @throws InterruptedException
*/ */
public final void challengeReceived(String challengeString, boolean finalChallenge) throws SmackException, NotConnectedException, 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); byte[] response = evaluateChallenge(challenge);
if (finalChallenge) { if (finalChallenge) {
return; return;