scp bug with 0x0a in filename:

Markus Friedl markus at openbsd.org
Wed Sep 12 20:52:02 EST 2001


i think this is a problem with the rcp protocol, it transfers
the filename with a trailing \n. use sftp :)

perhaps rcp/scp should refuse to transfer files with embedded \n?


On Mon, Sep 10, 2001 at 12:23:32AM +0100, Jonathan D. Amery wrote:
> 
>  This bug (Debian bug number 111692) occurs with filenames that have the
> character 0x0a in them (newline).
> 
>  This is how one repeats it:
> 
> ming.empire.pick.ucam.org:~/ssh-test/                   # [01/09/10.00:15:50] $
> : bash[592] ; cat > 'x
> x'
> This is a test.
> ming.empire.pick.ucam.org:~/ssh-test/                   # [01/09/10.00:16:17] $
> : bash[593] ; scp 'x
> x' dorothee:ssh-test/
> x
> x                    0% |                             |     0       --:-- ETA
> x                  100% |*****************************|    16       00:00    
> lost connection
> ming.empire.pick.ucam.org:~/ssh-test/                   # [01/09/10.00:16:39] $
> : bash[594] ; 
> 
> dorothee.empire.pick.ucam.org:~/ssh-test/               # [01/09/10.00:16:48] $
> : bash[504] ; ls
> x
> dorothee.empire.pick.ucam.org:~/ssh-test/               # [01/09/10.00:16:50] $
> : bash[505] ; cat x 
> x
> This is a testdorothee.empire.pick.ucam.org:~/ssh-test/               # [01/09/10.00:16:52] $
> : bash[506] ; 
> 
> 
>  If you notice the additional characters from the end of the filename
> ('x') have been appended to the front of the file, and the file has been
> named to the first part of the file name.
> 
> -- 
> Jonathan Amery.      Now there's a light at the end of the tunnel,
>    #####                Someone's lit a campfire in my cave.
>   #######__o         The first rays of dawn are breaking through the clouds,
>   #######'/             And somehow I know I can be brave.      - Steve Kitson
> 



More information about the openssh-unix-dev mailing list