[ https://issues.apache.org/jira/browse/SSHD-347?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Guillaume Nodet resolved SSHD-347. ---------------------------------- Resolution: Fixed Fix Version/s: 0.13.0 Assignee: Guillaume Nodet https://git-wip-us.apache.org/repos/asf?p=mina-sshd.git;a=commit;h=8fb0e52c599a11d0f16265b5979dafc712f0c481 > Sftplet.onConnect(...) does not obtain access to ServerSession > -------------------------------------------------------------- > > Key: SSHD-347 > URL: https://issues.apache.org/jira/browse/SSHD-347 > Project: MINA SSHD > Issue Type: Bug > Reporter: Dmitri Priimak > Assignee: Guillaume Nodet > Fix For: 0.13.0 > > > Using Sftplet I encountered one small problem. > In current git repo in file > sshd-sftp/src/main/java/org/apache/sshd/sftp/subsyste/SftpSubsystem.java > in lines 138 through 141 there is following code > public void setSession(ServerSession session) { > sftpLet.onConnect(this); > this.session = session; > } > This calls sftpLet.onConnect(...) before session is set, which means that at > that stage information from the session such as user name of the > person who logged in or the remote ip address is not available in inside of > onConnect(...) call even though ServerServer already has this information. > A simple swapping of just two lines should fix that, like so > public void setSession(ServerSession session) { > this.session = session; > sftpLet.onConnect(this); > } > Can such change be made in your code? -- This message was sent by Atlassian JIRA (v6.3.4#6332)