Skip to content

Commit

Permalink
#52 only return Remote Port Forwardings for the specific Session.
Browse files Browse the repository at this point in the history
  • Loading branch information
norrisjeremy committed Sep 2, 2021
1 parent 865b75a commit 6e33cd1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ As I explained in a [blog post](http://www.matez.de/index.php/2020/06/22/the-fut
* ssh-rsa-sha384@<!-- -->ssh.com
* ssh-rsa-sha512@<!-- -->ssh.com
* Added support for SHA224 to FingerprintHash
* Fixing [#52](https://github.com/mwiede/jsch/issues/52)
* [0.1.65](https://github.com/mwiede/jsch/releases/tag/jsch-0.1.65)
* Added system properties to allow manipulation of various crypto algorithms used by default
* Integrated JZlib, allowing use of zlib@<!-- -->openssh.com & zlib compressions without the need to provide the JZlib jar-file
Expand Down
10 changes: 6 additions & 4 deletions src/main/java/com/jcraft/jsch/ChannelForwardedTCPIP.java
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,12 @@ static String[] getPortForwarding(Session session){
synchronized(pool){
for(int i=0; i<pool.size(); i++){
Config config = pool.elementAt(i);
if(config instanceof ConfigDaemon)
foo.addElement(config.allocated_rport+":"+config.target+":");
else
foo.addElement(config.allocated_rport+":"+config.target+":"+((ConfigLHost)config).lport);
if(config.session==session){
if(config instanceof ConfigDaemon)
foo.addElement(config.allocated_rport+":"+config.target+":");
else
foo.addElement(config.allocated_rport+":"+config.target+":"+((ConfigLHost)config).lport);
}
}
}
String[] bar=new String[foo.size()];
Expand Down

0 comments on commit 6e33cd1

Please sign in to comment.