Subject: Why isn't scp 8-bit clean?

Why isn't scp 8-bit clean?

From: Uli Zappe <uli_at_ritual.org>
Date: Tue, 31 Aug 2010 02:04:25 +0200

I'm new to this list - so first Hi to everyone on the list!

I'm playing around with libssh2 and am especially interested in scp. However, I found that scp isn't 8-bit clean (contrary to sftp, which is).

The reason for this is the if clause in lines 614-630 in src/scp.c (libssh2-1.2.7). It returns

   LIBSSH2_ERROR_SCP_PROTOCOL, "Invalid data in SCP response"

as soon as a character > 126 surfaces in the sshd response, which it will do for every 8-bit or UTF-8 file name with a non-ASCII character.

Indeed, as soon as I changed "126" to "256" in line 626, scp worked just fine with 8-bit and UTF-8 file names, and I could not find any problem whatsoever.

So why this seemingly unnecessary limitation? Could there be any problems if I simply stuck with my modification of src/scp.c?

Thanks in advance for any replies!

(And many thanks for libssh2! :-)) )

            Bye
                    Uli
________________________________________________________

  Uli Zappe, Solmsstraße 5, D-65189 Wiesbaden, Germany
  http://www.ritual.org
  Fon: +49-700-ULIZAPPE
  Fax: +49-700-ZAPPEFAX
________________________________________________________

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2010-08-31