mirror of
https://github.com/moparisthebest/Conversations
synced 2024-11-28 11:42:15 -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:
|
||||
final String clientCalculatedServerFinalMessage = "v=" +
|
||||
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");
|
||||
}
|
||||
state = State.VALID_SERVER_RESPONSE;
|
||||
|
Loading…
Reference in New Issue
Block a user