Created attachment 2255 [details] Allow hash('#') character in filename patch. Not sure if this is by design, but ran across some files being transferred using sftp v4.5. When upgraded to v5.8 the filename is truncated at the '#' in the filename. If this is not by design, added a quick patch that seems to resolve.
'#' is intentionally used to indicate the start of a comment. Like other special characters, it should be quoted, e.g. get "a#b"
(In reply to comment #1) > '#' is intentionally used to indicate the start of a comment. > > Like other special characters, it should be quoted, e.g. > > get "a#b" Thanks. Will get our users to modify their code. Was not sure what the decision would be, and I shouldn't have been so terse in the ticket. But 2 things that you might want to consider. 1. Older versions 4.5, worked differently: $ ssh -V OpenSSH_4.5p1, OpenSSL 0.9.8d 28 Sep 2006 $ sftp `hostname`:/tmp/a#a Fetching /tmp/a#a to a#a But newer versions: $ ssh -V OpenSSH_5.8p1, OpenSSL 0.9.8a 11 Oct 2005 $ sftp `hostname`:/tmp/b#b File "/tmp/b" not found. 2. I was also under the impression that the '#' started a comment, but after seeing how from the shell we had to quote the '#', it doesn't look like all of the shell's parsers that I tested worked that way. It looks like the '#' only starts a comment at the beginning of a token: $ touch #a touch: missing file operand Try `touch --help' for more information. $ touch a#a $ ls a#a a#a Thanks again for any additional thought on this.
Set all RESOLVED bugs to CLOSED with release of OpenSSH 7.1