mirror of
https://github.com/moparisthebest/Conversations
synced 2024-11-24 17:52:17 -05:00
added null check in sasl response verifier
This commit is contained in:
parent
7eac30d1f4
commit
492e387482
@ -185,7 +185,7 @@ public class ScramSha1 extends SaslMechanism {
|
|||||||
case RESPONSE_SENT:
|
case RESPONSE_SENT:
|
||||||
final String clientCalculatedServerFinalMessage = "v=" +
|
final String clientCalculatedServerFinalMessage = "v=" +
|
||||||
Base64.encodeToString(serverSignature, Base64.NO_WRAP);
|
Base64.encodeToString(serverSignature, Base64.NO_WRAP);
|
||||||
if (!clientCalculatedServerFinalMessage.equals(new String(Base64.decode(challenge, Base64.DEFAULT)))) {
|
if (challenge == null || !clientCalculatedServerFinalMessage.equals(new String(Base64.decode(challenge, Base64.DEFAULT)))) {
|
||||||
throw new AuthenticationException("Server final message does not match calculated final message");
|
throw new AuthenticationException("Server final message does not match calculated final message");
|
||||||
}
|
}
|
||||||
state = State.VALID_SERVER_RESPONSE;
|
state = State.VALID_SERVER_RESPONSE;
|
||||||
|
Loading…
Reference in New Issue
Block a user