forked from apache/mina-sshd
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change the file handle implementation: use raw bytes, not hexified bytes. Representing file handles internally as hexified strings doubled the size, so with the default setting of 16, an Apache MINA file handle was actually 32 bytes on the network. SftpModuleProperties.FILE_HANDLE_SIZE specified that its the size in bytes of the file handle; so the final handle as sent to the client should not be twice the configured size. Because many APIs in Apache MINA sshd use String as the type to pass around such file handles, we cannot easily change that without potentially breaking a lot of user code. So keep storing file handles as strings, but use ISO-8859-1 to convert: this lets us store any byte value as a character. When printing file handles, for instance in log messages, hexify them explicitly. Bug: apache#403
- Loading branch information
Showing
6 changed files
with
257 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.