X2Go Bug report logs - #611
X2Go Client for Windows cannot create C:\Users\<username>\ssh\known_hosts file when the username has characters from languages other than the system locale

version graph

Package: x2goclient; Maintainer for x2goclient is X2Go Developers <x2go-dev@lists.x2go.org>; Source for x2goclient is src:x2goclient.

Reported by: <trakatelis@uom.gr>

Date: Mon, 11 Aug 2014 10:55:01 UTC

Severity: normal

Found in version

Full log

🔗 View this message in rfc822 format

X-Loop: owner@bugs.x2go.org
Subject: Bug#566: [X2Go-Dev] Bug#566: X2Go Client for Windows cannot create C:\Users\<username>\ssh\known_hosts file when the local Windows account username has non-Ascii characters
Reply-To: Michael DePaulo <mikedep333@gmail.com>, 566@bugs.x2go.org
Resent-From: Michael DePaulo <mikedep333@gmail.com>
Resent-To: x2go-dev@lists.x2go.org
Resent-CC: X2Go Developers <x2go-dev@lists.x2go.org>
X-Loop: owner@bugs.x2go.org
Resent-Date: Sun, 07 Sep 2014 13:25:01 +0000
Resent-Message-ID: <handler.566.B566.141009620423113@bugs.x2go.org>
Resent-Sender: owner@bugs.x2go.org
X-X2Go-PR-Message: followup 566
X-X2Go-PR-Package: x2goclient
Received: via spool by 566-submit@bugs.x2go.org id=B566.141009620423113
          (code B ref 566); Sun, 07 Sep 2014 13:25:01 +0000
Received: (at 566) by bugs.x2go.org; 7 Sep 2014 13:23:24 +0000
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_20,FREEMAIL_FROM,
	T_DKIM_INVALID autolearn=ham version=3.3.2
Received: from mail-we0-f181.google.com (mail-we0-f181.google.com [])
	by ymir.das-netzwerkteam.de (Postfix) with ESMTPS id 9773C3D379
	for <566@bugs.x2go.org>; Sun,  7 Sep 2014 15:23:22 +0200 (CEST)
Received: by mail-we0-f181.google.com with SMTP id x48so13620206wes.26
        for <566@bugs.x2go.org>; Sun, 07 Sep 2014 06:23:22 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
MIME-Version: 1.0
X-Received: by with SMTP id di6mr15718707wid.78.1410096202267;
 Sun, 07 Sep 2014 06:23:22 -0700 (PDT)
Received: by with HTTP; Sun, 7 Sep 2014 06:23:22 -0700 (PDT)
In-Reply-To: <000001cfca83$2b11d830$81358890$@edu.gr>
References: <000001cfb552$3193a8a0$94baf9e0$@gr>
Date: Sun, 7 Sep 2014 09:23:22 -0400
Message-ID: <CAMKht8hMDouAZr0zh0jQ8HhA_COJOfC-d0BKY4u6hTcCDEoQmQ@mail.gmail.com>
From: Michael DePaulo <mikedep333@gmail.com>
To: George Trakatelis <trakatelis@uom.edu.gr>, 566@bugs.x2go.org, 
	Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
Content-Type: multipart/mixed; boundary=001a1134d61c3d1b830502799ba8
[Message part 1 (text/plain, inline)]
On Sun, Sep 7, 2014 at 6:04 AM, George Trakatelis <trakatelis@uom.edu.gr> wrote:
> a. Installed German keyboard. Hit ';' to produce an accented letter
> and -to my surprise- got ö. So I thought ölexandr was the right name to test for username.
> b. Created user ölexandr and logged in as that user.
> The patch did not work, as you mentioned.
> c. As toLocal8Bit() returns the local 8-bit representation of a string,
> I changed the system locale for non-unicode programs to German.
> Now the patch worked!
> I think the patch solves the problem for the Windows users who use English
> as a foreign language and prefer having (non-Ascii) usernames in their native language.
> -George
> PS. A better title for the bug would be
> X2Go Client for Windows cannot create C:\Users\<username>\ssh\known_hosts file when the local Windows account username has non-Ascii characters

Hi Mike#1 and George,

1. What do you think of using toUtf8() instead? I am hoping that will
fix the bug regardless of the locale.

I tried changing it to that (bug566.utf8.test.patch), but it still did
not fix this bug with the greek username on my system with the locale
set to English. It did not introduce a regression for my ASCII user
account at least.

If libssh needs to be recompiled for Unicode, I can do that. I just
recompiled it for bug #590.

FYI: This is the API we are calling:

2. in sshmasterconnection.cpp, we also set "SSH_OPTIONS_USER" . I
think that we should also change its value from to.Ascii() to
toLocal8Bit() or toUtf8(). bug566.test.v2.patch has this change for
toLocal8Bit(), and bug566.utf8.test.patch has it for toUtf8().

[bug566.test.v2.patch (application/octet-stream, attachment)]
[bug566.utf8.test.patch (application/octet-stream, attachment)]

Send a report that this bug log contains spam.

X2Go Developers <owner@bugs.x2go.org>. Last modified: Fri Sep 18 13:29:53 2020; Machine Name: ymir.das-netzwerkteam.de

X2Go Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.