We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mina-sshd/sshd-core/src/main/java/org/apache/sshd/common/session/helpers/SessionHelper.java
Line 1149 in 71b842f
The reason is not passed through to the listener:
reason
protected void signalNegotiationEnd( SessionListener listener, Map<KexProposalOption, String> c2sOptions, Map<KexProposalOption, String> s2cOptions, Map<KexProposalOption, String> negotiatedGuess, Throwable reason) { if (listener == null) { return; } listener.sessionNegotiationEnd(this, c2sOptions, s2cOptions, negotiatedGuess, null); }
The doc for this says the negotiation is successful if this is null:
/** * Signals the end of the negotiation options handling * * @param session The referenced {@link Session} * @param clientProposal The client proposal options (un-modifiable) * @param serverProposal The server proposal options (un-modifiable) * @param negotiatedOptions The successfully negotiated options so far - even if exception occurred (un-modifiable) * @param reason Negotiation end reason - {@code null} if successful */ default void sessionNegotiationEnd( Session session, Map<KexProposalOption, String> clientProposal, Map<KexProposalOption, String> serverProposal, Map<KexProposalOption, String> negotiatedOptions, Throwable reason) { // ignored }
mina-sshd/sshd-core/src/main/java/org/apache/sshd/common/session/SessionListener.java
Line 151 in 71b842f
This looks like this will always be "successful", even in the error case?
} catch (IOException | RuntimeException | Error e) { signalNegotiationEnd(c2sOptions, s2cOptions, negotiatedGuess, e); throw e; }
mina-sshd/sshd-core/src/main/java/org/apache/sshd/common/session/helpers/AbstractSession.java
Line 2259 in 71b842f
Would changing the line from
listener.sessionNegotiationEnd(this, c2sOptions, s2cOptions, negotiatedGuess, null);
to
listener.sessionNegotiationEnd(this, c2sOptions, s2cOptions, negotiatedGuess, reason);
break anything?
The text was updated successfully, but these errors were encountered:
Thanks for pointing this out.
Would ... break anything?
No, it would not. Feel free to provide a PR.
Sorry, something went wrong.
Merge pull request #505 from duco-lw/issue-504-signalNegotiationEnd-p…
ee98f90
…ass-reason GH-504 Pass reason to sessionNegotiationEnd
No branches or pull requests
mina-sshd/sshd-core/src/main/java/org/apache/sshd/common/session/helpers/SessionHelper.java
Line 1149 in 71b842f
The
reason
is not passed through to the listener:The doc for this says the negotiation is successful if this is null:
mina-sshd/sshd-core/src/main/java/org/apache/sshd/common/session/SessionListener.java
Line 151 in 71b842f
This looks like this will always be "successful", even in the error case?
mina-sshd/sshd-core/src/main/java/org/apache/sshd/common/session/helpers/AbstractSession.java
Line 2259 in 71b842f
Would changing the line from
to
break anything?
The text was updated successfully, but these errors were encountered: