Skip to content

Commit

Permalink
THRIFT-4506: fix use of assert for correctness in Java SASL negotiation
Browse files Browse the repository at this point in the history
Client: java
  • Loading branch information
jeking3 committed Jan 29, 2019
1 parent 53dd398 commit 7489ed6
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/java/src/org/apache/thrift/transport/TSaslTransport.java
Original file line number Diff line number Diff line change
Expand Up @@ -287,16 +287,14 @@ public void open() throws TTransportException {
if (message.status == NegotiationStatus.COMPLETE &&
getRole() == SaslRole.CLIENT) {
LOGGER.debug("{}: All done!", getRole());
break;
continue;
}

sendSaslMessage(sasl.isComplete() ? NegotiationStatus.COMPLETE : NegotiationStatus.OK,
challenge);
}
LOGGER.debug("{}: Main negotiation loop complete", getRole());

assert sasl.isComplete();

// If we're the client, and we're complete, but the server isn't
// complete yet, we need to wait for its response. This will occur
// with ANONYMOUS auth, for example, where we send an initial response
Expand Down

0 comments on commit 7489ed6

Please sign in to comment.