From sylvain@ilm-informatique.fr  Fri Nov 27 14:35:03 2020
Received: (at submit) by bugs.x2go.org; 27 Nov 2020 13:35:16 +0000
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on
	ymir.das-netzwerkteam.de
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00,RCVD_IN_MSPIKE_H4,
	RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham
	autolearn_force=no version=3.4.2
Received: from 10.mo178.mail-out.ovh.net (10.mo178.mail-out.ovh.net [46.105.76.150])
	by ymir.das-netzwerkteam.de (Postfix) with ESMTPS id 54CE15DCAE
	for <submit@bugs.x2go.org>; Fri, 27 Nov 2020 14:35:03 +0100 (CET)
Received: from player737.ha.ovh.net (unknown [10.108.57.183])
	by mo178.mail-out.ovh.net (Postfix) with ESMTP id D18F7B8443
	for <submit@bugs.x2go.org>; Fri, 27 Nov 2020 14:26:19 +0100 (CET)
Received: from ilm-informatique.fr (99.234.153.77.rev.sfr.net [77.153.234.99])
	(Authenticated sender: sylvain@ilm-informatique.fr)
	by player737.ha.ovh.net (Postfix) with ESMTPSA id 611CEF21ED7B
	for <submit@bugs.x2go.org>; Fri, 27 Nov 2020 13:26:19 +0000 (UTC)
Authentication-Results:garm.ovh; auth=pass (GARM-95G0014935ccc3-ee6a-447f-b0b5-203ab21a9e56,
                    290D2A94A93D2106FCD762BD92ED46194860877F) smtp.auth=sylvain@ilm-informatique.fr
From: Sylvain Cuaz <sylvain@ilm-informatique.fr>
Subject: non Latin 1 passwords are rejected
To: submit@bugs.x2go.org
Message-ID: <2557141d-26c2-87f5-e4c1-5d162b6a20bf@ilm-informatique.fr>
Date: Fri, 27 Nov 2020 14:26:18 +0100
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101
 Thunderbird/68.10.0
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Content-Language: en-GB
X-Ovh-Tracer-Id: 18337250308806291401
X-VR-SPAMSTATE: OK
X-VR-SPAMSCORE: 0
X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedujedrudehgedgheefucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhuffvkffffgggtgfgsehtjeertddtfeejnecuhfhrohhmpefuhihlvhgrihhnucevuhgriicuoehshihlvhgrihhnsehilhhmqdhinhhfohhrmhgrthhiqhhuvgdrfhhrqeenucggtffrrghtthgvrhhnpedutefhveetjedvveekgfehieehjeetgeekieduveeijefhveeufffgfeduieegleenucffohhmrghinheplhhisghsshhhrdhorhhgnecukfhppedtrddtrddtrddtpdejjedrudehfedrvdefgedrleelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmohguvgepshhmthhpqdhouhhtpdhhvghlohepphhlrgihvghrjeefjedrhhgrrdhovhhhrdhnvghtpdhinhgvtheptddrtddrtddrtddpmhgrihhlfhhrohhmpehshihlvhgrihhnsehilhhmqdhinhhfohhrmhgrthhiqhhuvgdrfhhrpdhrtghpthhtohepshhusghmihhtsegsuhhgshdrgidvghhordhorhhg
X-Spam: Yes

Package: x2goclient
Version: 4.1.2.2

Passwords with accents are rejected by x2goclient while working fine directly with ssh.

Client OS Ubuntu 20.04.1 LTS with libssh 0.9.3-2ubuntu2.1
Server OS Ubuntu 16.04.6 LTS

According to the documentation of ssh_userauth_password(), passwords should be passed as UTF-8. But 
sshmasterconnection.cpp passes auth_password.toLatin1(). I think just changing to 
auth_password.toUtf8() should suffice.

Same thing goes for ssh_userauth_kbdint_setanswer() and maybe other calls.

https://api.libssh.org/stable/group__libssh__auth.html#ga50c0c150f8c4703e7ee49b3e3e3ca215

https://api.libssh.org/stable/group__libssh__auth.html#ga75e44b1f27059a00080f80fac0107a20


