diff options
author | Christian S <christian@pix-art.de> | 2015-08-19 18:59:12 +0200 |
---|---|---|
committer | Christian S <christian@pix-art.de> | 2015-08-19 18:59:12 +0200 |
commit | 497e5c57b94a6a1da74da1124c7b70e76b7574db (patch) | |
tree | 4c6e6293573e42af28b06984280aef62a1bb69d1 /src/main/java/eu/siacs/conversations/crypto/sasl | |
parent | 5d3be343ee9728d10ec46414b2abf5f0a0d49d7f (diff) | |
parent | 06fffc13cd1abf5576ef5ffb70798a42614a79a8 (diff) |
copy commits
Diffstat (limited to 'src/main/java/eu/siacs/conversations/crypto/sasl')
-rw-r--r-- | src/main/java/eu/siacs/conversations/crypto/sasl/ScramSha1.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main/java/eu/siacs/conversations/crypto/sasl/ScramSha1.java b/src/main/java/eu/siacs/conversations/crypto/sasl/ScramSha1.java index c95a62df3..f47677f6e 100644 --- a/src/main/java/eu/siacs/conversations/crypto/sasl/ScramSha1.java +++ b/src/main/java/eu/siacs/conversations/crypto/sasl/ScramSha1.java @@ -101,6 +101,9 @@ public class ScramSha1 extends SaslMechanism { public String getResponse(final String challenge) throws AuthenticationException { switch (state) { case AUTH_TEXT_SENT: + if (challenge == null) { + throw new AuthenticationException("challenge can not be null"); + } serverFirstMessage = Base64.decode(challenge, Base64.DEFAULT); final Tokenizer tokenizer = new Tokenizer(serverFirstMessage); String nonce = ""; |