mirror of
https://github.com/moparisthebest/Conversations
synced 2024-11-28 11:42:15 -05:00
catch null pointer in ScramSHA1 sasl
This commit is contained in:
parent
11fbc3d79e
commit
c082066118
@ -101,6 +101,9 @@ public class ScramSha1 extends SaslMechanism {
|
|||||||
public String getResponse(final String challenge) throws AuthenticationException {
|
public String getResponse(final String challenge) throws AuthenticationException {
|
||||||
switch (state) {
|
switch (state) {
|
||||||
case AUTH_TEXT_SENT:
|
case AUTH_TEXT_SENT:
|
||||||
|
if (challenge == null) {
|
||||||
|
throw new AuthenticationException("challenge can not be null");
|
||||||
|
}
|
||||||
serverFirstMessage = Base64.decode(challenge, Base64.DEFAULT);
|
serverFirstMessage = Base64.decode(challenge, Base64.DEFAULT);
|
||||||
final Tokenizer tokenizer = new Tokenizer(serverFirstMessage);
|
final Tokenizer tokenizer = new Tokenizer(serverFirstMessage);
|
||||||
String nonce = "";
|
String nonce = "";
|
||||||
|
Loading…
Reference in New Issue
Block a user