tomaswolf commented on issue #329:
URL: https://github.com/apache/mina-sshd/issues/329#issuecomment-1462387626

   > Illogical sftp packet length: 499335
   
   I guess openSSH sftp would run into the same problem then.
   
   This is simply a hole in the SFTP draft RFCs. They do specify minimum 
message length requirements when it comes to uploading/downloading file data 
(at least 34000 bytes), but no maximum, and especially no maximum for directory 
listings. That directory listings should be chunked is kind of implicit in the 
fact that a client is supposed to issue READDIR requests until it gets an EOF. 
But there is no indication for the maximum size of a chunk.
   
   To be on the safe side, a server would need to limit directory listing chunk 
sizes to less than 34000 bytes. That should work with any SFTP client. Sending 
more than 256kB per chunk is likely to break SFTP clients, given that it's the 
openSSH limit, and most other clients take openSSH as an inspiration.
   
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to