Skip to content

Commit 5ddeb04

Browse files
committed
e can't be empty
1 parent 5bba20f commit 5ddeb04

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

httpclient5/src/main/java/org/apache/hc/client5/http/impl/auth/ScramScheme.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,9 @@ public void processChallenge(
293293
final String err = attrs.get("e");
294294
if (err != null) {
295295
this.state = State.FAILED;
296+
if (err.isEmpty()) {
297+
throw new MalformedChallengeException("SCRAM server error attribute 'e' is empty");
298+
}
296299
throw new AuthenticationException("SCRAM server error: " + err);
297300
}
298301
final String vB64 = attrs.get("v");
@@ -675,7 +678,4 @@ public String toString() {
675678
}
676679
}
677680

678-
private static boolean isBlank(final String s) {
679-
return s == null || s.isEmpty();
680-
}
681681
}

0 commit comments

Comments
 (0)