From unknown Thu Mar 28 18:29:37 2024 X-Loop: owner@bugs.x2go.org Subject: Bug#566: [X2Go-Dev] Bug#566: X2Go Client for Windows 4.0.2.1 cannot create C:\Users\\ssh\known_hosts file when the local Windows account username has non-Ascii characters Reply-To: Mike Gabriel , 566@bugs.x2go.org Resent-From: Mike Gabriel Resent-To: x2go-dev@lists.x2go.org Resent-CC: X2Go Developers X-Loop: owner@bugs.x2go.org Resent-Date: Mon, 08 Sep 2014 09:00:01 +0000 Resent-Message-ID: Resent-Sender: owner@bugs.x2go.org X-X2Go-PR-Message: followup 566 X-X2Go-PR-Package: x2goclient X-X2Go-PR-Keywords: Received: via spool by 566-submit@bugs.x2go.org id=B566.14101667153646 (code B ref 566); Mon, 08 Sep 2014 09:00:01 +0000 Received: (at 566) by bugs.x2go.org; 8 Sep 2014 08:58:35 +0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on ymir.das-netzwerkteam.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.3.2 Received: from freya.das-netzwerkteam.de (freya.das-netzwerkteam.de [88.198.48.199]) by ymir.das-netzwerkteam.de (Postfix) with ESMTPS id DBFAC3D375 for <566@bugs.x2go.org>; Mon, 8 Sep 2014 10:58:33 +0200 (CEST) Received: from grimnir.das-netzwerkteam.de (grimnir.das-netzwerkteam.de [78.46.204.98]) by freya.das-netzwerkteam.de (Postfix) with ESMTPS id A3EBC3DC; Mon, 8 Sep 2014 10:58:33 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by grimnir.das-netzwerkteam.de (Postfix) with ESMTP id 88B6F3BBAE; Mon, 8 Sep 2014 10:58:33 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at grimnir.das-netzwerkteam.de Received: from grimnir.das-netzwerkteam.de ([127.0.0.1]) by localhost (grimnir.das-netzwerkteam.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Y+B62V2-KOgL; Mon, 8 Sep 2014 10:58:33 +0200 (CEST) Received: from grimnir.das-netzwerkteam.de (localhost [127.0.0.1]) by grimnir.das-netzwerkteam.de (Postfix) with ESMTPS id 39DDF3BB24; Mon, 8 Sep 2014 10:58:33 +0200 (CEST) Received: from m-031.informatik.uni-kiel.de (m-031.informatik.uni-kiel.de [134.245.254.31]) by mail.das-netzwerkteam.de (Horde Framework) with HTTP; Mon, 08 Sep 2014 08:58:33 +0000 Date: Mon, 08 Sep 2014 08:58:33 +0000 Message-ID: <20140908085833.Horde.1KVN9LjgQ3GOkz4EX-JZjA1@mail.das-netzwerkteam.de> From: Mike Gabriel To: Michael DePaulo Cc: George Trakatelis , 566@bugs.x2go.org References: <000001cfb552$3193a8a0$94baf9e0$@gr> <000001cfc60a$32831de0$978959a0$@gr> <20140901195103.Horde.HOAd34FDzvE7MwwNBCtaAg1@mail.das-netzwerkteam.de> <000001cfca83$2b11d830$81358890$@edu.gr> In-Reply-To: User-Agent: Internet Messaging Program (IMP) H5 (6.2.0) Accept-Language: en,de Organization: DAS-NETZWERKTEAM X-Originating-IP: 134.245.254.31 X-Remote-Browser: Mozilla/5.0 (X11; Linux x86_64; rv:32.0) Gecko/20100101 Firefox/32.0 Iceweasel/32.0 Content-Type: multipart/signed; boundary="=_djrjbal-WzPlSm072x5kgA1"; protocol="application/pgp-signature"; micalg=pgp-sha1 MIME-Version: 1.0 This message is in MIME format and has been PGP signed. --=_djrjbal-WzPlSm072x5kgA1 Content-Type: text/plain; charset=utf-8; format=flowed; DelSp=Yes Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Mike#2, On So 07 Sep 2014 15:23:22 CEST, Michael DePaulo wrote: > On Sun, Sep 7, 2014 at 6:04 AM, George Trakatelis=20=20 >=20 wrote: > [...] >> >> a. Installed German keyboard. Hit ';' to produce an accented letter >> and -to my surprise- got =C3=B6. So I thought =C3=B6lexandr was the righ= t=20=20 >>=20name to test for username. >> >> b. Created user =C3=B6lexandr 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 Engli= sh >> as a foreign language and prefer having (non-Ascii) usernames in=20=20 >>=20their native language. >> >> -George >> >> PS. A better title for the bug would be >> >> X2Go Client for Windows 4.0.2.1 cannot create=20=20 >>=20C:\Users\\ssh\known_hosts file when the local Windows=20=20 >>=20account 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: > http://api.libssh.org/stable/group__libssh__session.html#ga7a801b85800baa= 3f4e16f5b47db0a73d I am getting the suspicion, that this is a libssh issue. X2Go Client and libssh should communicate via UTF-8 (because it is=20=20 _the_=20encoding that applications use internally, nowadays) and libssh=20= =20 should=20handle whatever conversion (probably to UTF-16 wide string?) is=20= =20 necessary=20for creating files, being aware of usernames, etc. > 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(). Same thing. SSH_OPTIONS_USER should be set as UTF-8 and libssh should=20=20 convert=20to whatever encoding is needed. Greets, Mike --=20 DAS-NETZWERKTEAM mike=20gabriel, herweg 7, 24357 fleckeby fon: +49 (1520) 1976 148 GnuPG Key ID 0x25771B31 mail: mike.gabriel@das-netzwerkteam.de, http://das-netzwerkteam.de freeBusy: https://mail.das-netzwerkteam.de/freebusy/m.gabriel%40das-netzwerkteam.de.x= fb --=_djrjbal-WzPlSm072x5kgA1 Content-Type: application/pgp-signature Content-Description: Digitale PGP-Signatur Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABAgAGBQJUDW+5AAoJEJr0azAldxsxmNkP/iQzNBT0Z3mXv88dGz3G1qtt l3kW091icdsufQajBiVn+CXfmcoVW++YWG72utjqSH2dhmXp6yVy8AYA/MF/7X8Q 6sHGfH/kFhBgo4sPhvBJCmeCFpyC6AH1Pz93OSxIwbJ3Tr+6vaU0exH4/UQVWg2K Y6HJDsZ40rxNkm8EaQ8I9Xb63ujQHB83WK6JuAdPBio0cXylToTuJAkYupnhen6g +ok2Iq3m8JdNIEwFdbsUuVsAtmLE/wTcTD1dR6EODZxY4wvPWADZeuR5zIPLfyYO dCAyEaNSLul+RKFyALTpvfXl6M+LzlMqrfE1Tpj0LEzgv4NQcvBA542EYgtgTKGn CKMkAeCv1KXlRyjTqFM4WhJhqDBRsB8AX22c0Ad2U30pkkwlBQqSTay/5oMBe7JN Z+kmyF1KxCGR3BrBN90gfDWHSWQfKHbn11jcCmEIkLeNFOElUGkzcjkF7d/kiYi7 nJyJitxzje+0v3exNkZ8o6QH8prMHbJ9eFxYXPun2L9cpGTN7JrDfppU2emvIrzi XUB5ajBq8ChxJkoORWdhts1NG4M8Me0yKSlZyoZRZlYu+aak/dAxNXz9VXjWvhgL AUAEb7lZMtlSPXgpkW2huV4a/IUOuTdZi9y3+cGyreBAzgEbq6wdk6GR/8ddiI/h /PTgBd8AY2+deHFKwWhc =7zHG -----END PGP SIGNATURE----- --=_djrjbal-WzPlSm072x5kgA1--