From unknown Tue Apr 28 06:30:03 2026
X-Loop: owner@bugs.x2go.org
Subject: Bug#1131: [X2Go-Dev] Bug#1131: x2gosqlitewrapper - Session not opening when username starts with a number
Reply-To: Stefan Baur <X2Go-ML-1@baur-itcs.de>, 1131@bugs.x2go.org
Resent-From: Stefan Baur <X2Go-ML-1@baur-itcs.de>
Resent-To: x2go-dev@lists.x2go.org
Resent-CC: owner@bugs.x2go.org
X-Loop: owner@bugs.x2go.org
Resent-Date: Mon, 09 Jan 2017 14:00:02 +0000
Resent-Message-ID: <handler.1131.B1131.14839701214004@bugs.x2go.org>
Resent-Sender: owner@bugs.x2go.org
X-X2Go-PR-Message: followup 1131
X-X2Go-PR-Package: x2gosqlitewrapper
X-X2Go-PR-Keywords: 
Received: via spool by 1131-submit@bugs.x2go.org id=B1131.14839701214004
          (code B ref 1131); Mon, 09 Jan 2017 14:00:02 +0000
Received: (at 1131) by bugs.x2go.org; 9 Jan 2017 13:55:21 +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=3.0 tests=BAYES_00,URIBL_BLOCKED
	autolearn=ham version=3.3.2
Received: from localhost (localhost [127.0.0.1])
	by ymir.das-netzwerkteam.de (Postfix) with ESMTP id D723A3CC60
	for <1131@bugs.x2go.org>; Mon,  9 Jan 2017 14:55:18 +0100 (CET)
X-Virus-Scanned: Debian amavisd-new at ymir.das-netzwerkteam.de
Received: from ymir.das-netzwerkteam.de ([127.0.0.1])
	by localhost (ymir.das-netzwerkteam.de [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id kmNIBV11elWz for <1131@bugs.x2go.org>;
	Mon,  9 Jan 2017 14:55:12 +0100 (CET)
X-Greylist: delayed 304 seconds by postgrey-1.34 at ymir.das-netzwerkteam.de; Mon, 09 Jan 2017 14:55:12 CET
Received: from mout.kundenserver.de (mout.kundenserver.de [217.72.192.75])
	by ymir.das-netzwerkteam.de (Postfix) with ESMTPS id 17B543CC5F
	for <1131@bugs.x2go.org>; Mon,  9 Jan 2017 14:55:12 +0100 (CET)
Received: from [192.168.0.23] ([78.43.90.159]) by mrelayeu.kundenserver.de
 (mreue102 [212.227.15.145]) with ESMTPSA (Nemesis) id
 0MWRtC-1bxXAf46pe-00Xeaz; Mon, 09 Jan 2017 14:50:04 +0100
To: Frank Knoben <admin@igpm.rwth-aachen.de>, 1131@bugs.x2go.org
References: <9ed12fe6-4cf4-1730-5bef-318186c77ecd@igpm.rwth-aachen.de>
From: Stefan Baur <X2Go-ML-1@baur-itcs.de>
Message-ID: <0a8205f7-aa75-13f6-071d-1b52a4f74858@baur-itcs.de>
Date: Mon, 9 Jan 2017 14:50:01 +0100
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101
 Thunderbird/45.6.0
MIME-Version: 1.0
In-Reply-To: <9ed12fe6-4cf4-1730-5bef-318186c77ecd@igpm.rwth-aachen.de>
Content-Type: multipart/signed; micalg=pgp-sha256;
 protocol="application/pgp-signature";
 boundary="LXVhf6wACA7xI6qLMFdTprTKE9csapXBJ"
X-Provags-ID: V03:K0:/AFG0GqdPWwfJKZZAOepon4aCv+oG0czaDe/VR5g5t6iWdFlxQe
 vTsGk73Fz7O4BfXkG7wfcSYGb+LJY8Oqf49cb9XiIEbcD+mv/zds6aF+8KiAr9BoB+jrAl2
 uCWwHTDvAn3sdf2oWfvlidzFxGK1FRw36DlisWOcMkuBJanB1hLd9PgAfsks3kfBAXhYfNh
 b8qLc/MEAHL26NED+8R1w==
X-UI-Out-Filterresults: notjunk:1;V01:K0:t6w7ILDlmwA=:BQs9fHX6tykuADdm1h/uJN
 NJ3dD7NJknXUSQMjQDz2Thin0CKuf50fwdtb4OLzDsxklWLZPZCR3zzDzjhl8wu5fTnHuWBNm
 Bod4LiPQdlLmltyW6hML5KW0EYbnlmLLlepTV4azpR39igqmhlkRIACen8J4+kq+JF+gScN3i
 lxETrhILjGU1aZIRM95riJDn1DbIiXISR0cM6UMzNqd4CjgtNBeAL9NGfPMYc7e0pCeeuvYg0
 KD8Rx1gU4H14TZSkXN7klZ6nElCPPodmLxrJ9NX4x4bNtm1J3wMU+uFz9iGbN/WUTmHN7XWUJ
 rA/MSyNWmetvKhJ7gkb/pfb8rXAiNNNrloqS4+PGNa2Egnhb4LpCxLxpwvozwxGfRgEiWZY5c
 7qsLgn2EcVlgCWSMzS5sgtNkJR1nMlAk7RN71H1bLRFT2box/Z9RfdIwpxdx/3yUN4VUoeVHg
 iWvNgIfah/xr68oCzSkRZs0cyvf+DyzlPLOEYgktxdnCd0d0eEgvfD5A7TWH/hobqe78b587g
 0gAVpv/QRc/+msGl6eJ1ytqb641oQfNsNJXtGp2Tj1l5/CDmIB+y3Dan4TSm8tqo7aGcYouZq
 T929ZYg9wKqvahb35poUoRJBjuVPGqo55H1m8PekdPd2h84CmQU/ZqN3BFa9sjV9agSgeSPQg
 Q0sp5U74ZS/dxYGjbt0EX7IYl0AeIHAWVSxuFIsXXuRS7XWYuFkd9Kv57hXb3t1ATGsA=

This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--LXVhf6wACA7xI6qLMFdTprTKE9csapXBJ
Content-Type: multipart/mixed; boundary="rScdC96BrPHi3Kn3iXSeBujqgbw28gwTT";
 protected-headers="v1"
From: Stefan Baur <X2Go-ML-1@baur-itcs.de>
To: Frank Knoben <admin@igpm.rwth-aachen.de>, 1131@bugs.x2go.org
Message-ID: <0a8205f7-aa75-13f6-071d-1b52a4f74858@baur-itcs.de>
Subject: Re: [X2Go-Dev] Bug#1131: x2gosqlitewrapper - Session not opening when
 username starts with a number
References: <9ed12fe6-4cf4-1730-5bef-318186c77ecd@igpm.rwth-aachen.de>
In-Reply-To: <9ed12fe6-4cf4-1730-5bef-318186c77ecd@igpm.rwth-aachen.de>

--rScdC96BrPHi3Kn3iXSeBujqgbw28gwTT
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: quoted-printable

reassign -1 x2goserver

Hi,

this problem occurs because your user names are violating the POSIX
standard, which states that usernames must not begin with digits.

Let me guess, you are authenticating against a Windows Domain / Active
Directory, which obviously doesn't care about POSIX (well, why should it)=
=2E

So far, our stance was that we should conform to POSIX standards.

However, this issue has cropped up quite a bit lately, so maybe adding
support for corresponding config options to /etc/x2go/x2goserver.conf
would be an idea - something like

# support usernames that violate POSIX standard
allow_usernames_with_leading_digit=3Dtrue|false
allow_usernames_with_backslashes=3Dtrue|false # would fix Bug #227 as wel=
l

And while we're at it, let me suggest these as well, just for good
measure - not sure if they still pose a problem but we did have issues
with at least dashes in the past (ca. 2012):
allow_usernames_with_slashes=3Dtrue|false
allow_usernames_with_dashes=3Dtrue|false
allow_usernames_with_spaces=3Dtrue|false

I wonder what the developers think about this approach?

Kind Regards,
Stefan Baur

Am 09.01.2017 um 14:25 schrieb Frank Knoben:
> Package: x2gosqlitewrapper
> Version: 4.0.1.20-3.4
>=20
> When a username starts with a number, the session on the client compute=
r
> will not open, after connecting to the server.
> The problem lies within x2gosqlitewrapper.pl in the sanitizer function.=

> This function will return 0 in the  $type eq "x2gosid" case, when the
> username starts with a number.
> My workaround is to add a 0-9 in the line number 67 of x2gosqlitewrappe=
r.pl
>=20
>=20
> diff x2gosqlitewrapper.pl x2gosqlitewrapper.pl.original
> 67c67
> <                       if ($string =3D~
> /^([a-zA-Z0-9\_][a-zA-Z0-9\_\-\.\@]{0,47}[\$]?)\-([\d]{2,4})\-([\d]{9,1=
2})\_[a-zA-Z0-9\_\-\.]*\_dp[\d]{1,2}$/)
> {
> ---
>>                       if ($string =3D~
>> /^([a-zA-Z\_][a-zA-Z0-9\_\-\.\@]{0,47}[\$]?)\-([\d]{2,4})\-([\d]{9,12}=
)\_[a-zA-Z0-9\_\-\.]*\_dp[\d]{1,2}$/)
>> {
>=20
>=20
> elsif ($type eq "x2gosid") {
>                 $string =3D~ s/[^a-zA-Z0-9\_\-\$\.\@]//g;
>                 if ($string =3D~ /^([a-zA-Z0-9\_\-\$\.\@]*)$/) {
>                         $string =3D $1;
> -                        if ($string =3D~
> /^([a-zA-Z\_][a-zA-Z0-9\_\-\.\@]{0,47}[\$]?)\-([\d]{2,4})\-([\d]{9,12})=
\_[a-zA-Z0-9\_\-\.]*\_dp[\d]{1,2}$/)
> {
> +                        if ($string =3D~
> /^([a-zA-Z0-9\_][a-zA-Z0-9\_\-\.\@]{0,47}[\$]?)\-([\d]{2,4})\-([\d]{9,1=
2})\_[a-zA-Z0-9\_\-\.]*\_dp[\d]{1,2}$/)
> {
>                                 if ((length($1) > 0) and (length($1) <
> 48)){
>                                         return $string;
>                                 } else {return 0;}
>                         } else {return 0;}
>                 } else {return 0;}
>         }
>=20
> I  am using a OpenSuSE Leap System with x2goserver Version 4.0.1.20-3.4=

>=20
> Sincerly
>=20
> Frank Knoben
> _______________________________________________
> x2go-dev mailing list
> x2go-dev@lists.x2go.org
> http://lists.x2go.org/listinfo/x2go-dev


--=20
BAUR-ITCS UG (haftungsbeschr=E4nkt)
Gesch=E4ftsf=FChrer: Stefan Baur
Eichen=E4ckerweg 10, 89081 Ulm | Registergericht Ulm, HRB 724364
Fon/Fax 0731 40 34 66-36/-35 | USt-IdNr.: DE268653243


--rScdC96BrPHi3Kn3iXSeBujqgbw28gwTT--

--LXVhf6wACA7xI6qLMFdTprTKE9csapXBJ
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCAAGBQJYc5UJAAoJEG7d9BjNvlEZt9wIAJzCl9iC59SP74W2WIMnBl2l
K41qrzK5zCih+yx2eaRUesop5B+kF0IpEXWlBBPH7+XPFbwPlo+KFyKgbDy4RY8i
0thdRQYkHvZ/FrU0AJk6n6o9jmNKmzEMmV0XCPohp01z/h7AsyMZToXFXyZDQONC
uZQsM8yADOaZURGye9VC8O4/UjVDTuebveX9TtRo5f0Ewb9ZLVxWBez5+N4UzA4w
FAZKxqazgDAUij7v8/n4dvGtbZ9nZgD9K8ws/Jbdw0OGUVcR+iTsvYS+EtzTKGl+
QkaySMV/DaWT+QR6HUtlu8OfMbV5zs8SRkEYO1dQXrFH1lkc3Pbu81zAbMzhOkc=
=yC5d
-----END PGP SIGNATURE-----

--LXVhf6wACA7xI6qLMFdTprTKE9csapXBJ--
