Invalid user name: function okname() in scp.c

Ángel González keisial at gmail.com
Sat Mar 17 11:21:56 EST 2012


On 14/03/12 12:07, Reza Hedayat wrote:
> Hi Ángel
>
> I just wanted to enquire if there is a chance that you will remove the
> hash sign (#) validation from the OpenSSH code base.
>
> Even the attempt to escape the # character results in rejection of the
> complete command by SCP.
> SSH client and SFTP work perfectly with # characters in user names, it
> is just SCP that rejects it.
> On the server side there are IBM AS/400 systems having usernames
> containing # characters, which are completely valid, legal and
> commonplace on that platform.
>
> Best wishes
> Reza
Hello Reza,
I gave it a go. See the attached patch.
I just allowed # in the middle of a word, which _should_ be safe to do,
as in it's only special for a shell as the first token character (per
POSIX rules).
It seems to work fine.

Best regards



-------------- next part --------------
A non-text attachment was scrubbed...
Name: okname-v1.patch
Type: text/x-patch
Size: 335 bytes
Desc: not available
URL: <http://lists.mindrot.org/pipermail/openssh-unix-dev/attachments/20120317/e7c52a69/attachment.bin>


More information about the openssh-unix-dev mailing list