[Bug 891] possible problem with non-printing characters during scp copy

bugzilla-daemon at mindrot.org bugzilla-daemon at mindrot.org
Sun Jul 4 16:14:32 EST 2004


http://bugzilla.mindrot.org/show_bug.cgi?id=891





------- Additional Comments From dtucker at zip.com.au  2004-07-04 16:14 -------
Created an attachment (id=680)
 --> (http://bugzilla.mindrot.org/attachment.cgi?id=680&action=view)
Encode newlines in filename for scp transfer

It looks like the sending scp bails on the file because the name contains a
newline (inside the protocol the file details are sent as "Cmodes size name\n"
so there's no way to encode a literal newline into a filename).  When the
sending scp bails, the receiving scp gets out of sync and drops the connection.


We could do something like the attached which encodes them as printable chars. 
The file will transfer but the name will be wrong.

On the other hand, the scp protocol is obsolete and has unfixable limitations,
it might not be worth fiddling with it any more.

If anyone wants to play with this, try:
mkdir /tmp/tmp1
perl -e 'open(a, ">/tmp/tmp1/t\n\r\n.HTM")'; 
scp -r /tmp/tmp1 localhost:/tmp/tmp2




------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.




More information about the openssh-bugs mailing list