tomaswolf commented on issue #329: URL: https://github.com/apache/mina-sshd/issues/329#issuecomment-1458847714
Yes, this could be turned into a parameter. RFC 4253 is irrelevant here; this is about the maximum length of an SFTP message, not about SSH packet size. The limit checked here is 256kB. I agree that `8 * SshConstants.SSH_REQUIRED_PAYLOAD_PACKET_LENGTH_SUPPORT` is a bit of a strange way to express that because the semantics is actually something else not related to SSH packets. It appears that the SFTP draft RFCs do not define a maximum SFTP message size. The message format uses an uint32 for the length field. Most implementations do impose a maximum size much smaller than 4GB to avoid out-of-memory conditions. OpenSSH sends back at most 100 directory entries in one message, and has a global maximum message size of 256kB. Apache MINA sshd limits the size of the reply in a directory listing to at most `SftpModuleProperties.MAX_READDIR_DATA_SIZE`. Out of interest: what SFTP server sent a larger SFTP message for that directory listing, and how large was it? (The exception message should have given the length.) -- 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]
