Repository navigation
Conversation
The class documents that error-stream peer verification is enabled by default, and FTPClient initialises the same flag to true, but the field was left uninitialised so it defaulted to false and the check in createErrorStream was skipped.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
RExecClient documents that verification of the remote host providing a separate error stream is enabled by default, and the sibling FTPClient initialises the same flag to true, but here the field is left uninitialised so it defaults to false. That means the anti-hijacking check in createErrorStream is skipped unless a caller turns it on by hand, so an attacker who is monitoring the rexec or rcmd negotiation can race a connection to the advertised error-stream port and have it accepted as the remote process's stderr. This initialises the flag to true so the documented default is honoured; RCommandClient and RLoginClient inherit the field, and the added tests fail on master and pass with the change.
mvn; that'smvnon the command line by itself.