dragonknight88 commented on issue #403:
URL: https://github.com/apache/mina-sshd/issues/403#issuecomment-1683329070

   > As it definitely is a bug in WS_FTP, can you file a bug report there? Or 
comment on 
https://community.progress.com/s/question/0D54Q0000ASQm9FSQT/bad-length-32796-for-cmdsshmsgchanneldata-max-allowed32768
 .
   
   It was reported by me :) I will add more info on RFC (file handle, 4-258 
byte limits and buffer calc.)
   
   > I'll see if I can rewrite this file handle stuff in Apache MINA sshd to 
use 4 bytes by default. Shouldn't be too hard.
   
   Meanwhile, a possible quick fix could be made on [Validation condition - 
AbstractChannel.java#L856](https://github.com/apache/mina-sshd/blob/786fd51ba20e0dc1ed998a6fe3772156983e18a9/sshd-core/src/main/java/org/apache/sshd/common/channel/AbstractChannel.java#L856)
 as it appears +4L confusion here is related to fileHandle * 2 byte count you 
mentioned above. And partly the reason why file handle size of 4 succeeds 
without validation failure. 
   
   ```
           if (len > (maxLocalSize + fileHandleSize * 2 - 4L)) { 
   ```
   
   Thank you so much Tomas for taking the time and helping out on the issue.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org
For additional commands, e-mail: dev-h...@mina.apache.org

Reply via email to