X2Go Bug report logs - #1131
x2gosqlitewrapper - Session not opening when username starts with a number

version graph

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

Reported by: Frank Knoben <admin@igpm.rwth-aachen.de>

Date: Mon, 9 Jan 2017 13:40:01 UTC

Severity: normal

Found in version

Full log

🔗 View this message in rfc822 format

X-Loop: owner@bugs.x2go.org
Subject: Bug#1131: x2gosqlitewrapper - Session not opening when username starts with a number
Reply-To: Frank Knoben <admin@igpm.rwth-aachen.de>, 1131@bugs.x2go.org
Resent-From: Frank Knoben <admin@igpm.rwth-aachen.de>
Original-Sender: frank@igpm.rwth-aachen.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 13:40:01 +0000
Resent-Message-ID: <handler.1131.B.148396894532767@bugs.x2go.org>
Resent-Sender: owner@bugs.x2go.org
X-X2Go-PR-Message: report 1131
X-X2Go-PR-Package: x2gosqlitewrapper
Received: via spool by submit@bugs.x2go.org id=B.148396894532767
          (code B); Mon, 09 Jan 2017 13:40:01 +0000
Received: (at submit) by bugs.x2go.org; 9 Jan 2017 13:35:45 +0000
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
X-Spam-Status: No, score=0.8 required=3.0 tests=BAYES_50,URIBL_BLOCKED
	autolearn=ham version=3.3.2
Received: from localhost (localhost [])
	by ymir.das-netzwerkteam.de (Postfix) with ESMTP id 143B53CC5F
	for <submit@bugs.x2go.org>; Mon,  9 Jan 2017 14:35:44 +0100 (CET)
X-Virus-Scanned: Debian amavisd-new at ymir.das-netzwerkteam.de
Received: from ymir.das-netzwerkteam.de ([])
	by localhost (ymir.das-netzwerkteam.de []) (amavisd-new, port 10024)
	with ESMTP id Dyq6xnhfAmPu for <submit@bugs.x2go.org>;
	Mon,  9 Jan 2017 14:35:37 +0100 (CET)
X-Greylist: delayed 571 seconds by postgrey-1.34 at ymir.das-netzwerkteam.de; Mon, 09 Jan 2017 14:35:37 CET
Received: from mx-out-1.rwth-aachen.de (mx-out-1.rwth-aachen.de [])
	by ymir.das-netzwerkteam.de (Postfix) with ESMTPS id 3FD965DA91
	for <submit@bugs.x2go.org>; Mon,  9 Jan 2017 14:35:37 +0100 (CET)
X-IronPort-AV: E=Sophos;i="5.33,339,1477954800"; 
Received: from igpm.igpm.rwth-aachen.de ([])
  by mx-1.rz.rwth-aachen.de with ESMTP; 09 Jan 2017 14:26:06 +0100
Received: from indy5.igpm.rwth-aachen.de ([])
	by igpm.igpm.rwth-aachen.de with esmtps (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256)
	(Exim 4.84_2)
	(envelope-from <frank@igpm.rwth-aachen.de>)
	id 1cQZxe-0000Y5-0G
	for submit@bugs.x2go.org; Mon, 09 Jan 2017 14:26:06 +0100
Received: from lecorbusier.igpm.rwth-aachen.de ([])
	by indy5.igpm.rwth-aachen.de with esmtpsa (TLSv1.2:AES128-SHA:128)
	(Exim 4.84_2)
	(envelope-from <frank@igpm.rwth-aachen.de>)
	id 1cQZxc-000CSD-Ou
	for submit@bugs.x2go.org; Mon, 09 Jan 2017 14:26:04 +0100
From: Frank Knoben <admin@igpm.rwth-aachen.de>
To: submit@bugs.x2go.org
Message-ID: <9ed12fe6-4cf4-1730-5bef-318186c77ecd@igpm.rwth-aachen.de>
Date: Mon, 9 Jan 2017 14:25:59 +0100
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Sender: frank@igpm.rwth-aachen.de
Package: x2gosqlitewrapper

When a username starts with a number, the session on the client computer 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 x2gosqlitewrapper.pl

diff x2gosqlitewrapper.pl x2gosqlitewrapper.pl.original
<                       if ($string =~ /^([a-zA-Z0-9\_][a-zA-Z0-9\_\-\.\@]{0,47}[\$]?)\-([\d]{2,4})\-([\d]{9,12})\_[a-zA-Z0-9\_\-\.]*\_dp[\d]{1,2}$/) {
>                       if ($string =~ /^([a-zA-Z\_][a-zA-Z0-9\_\-\.\@]{0,47}[\$]?)\-([\d]{2,4})\-([\d]{9,12})\_[a-zA-Z0-9\_\-\.]*\_dp[\d]{1,2}$/) {

elsif ($type eq "x2gosid") {
                $string =~ s/[^a-zA-Z0-9\_\-\$\.\@]//g;
                if ($string =~ /^([a-zA-Z0-9\_\-\$\.\@]*)$/) {
                        $string = $1;
-                        if ($string =~ /^([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 =~ /^([a-zA-Z0-9\_][a-zA-Z0-9\_\-\.\@]{0,47}[\$]?)\-([\d]{2,4})\-([\d]{9,12})\_[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;}

I  am using a OpenSuSE Leap System with x2goserver Version


Frank Knoben

Send a report that this bug log contains spam.

X2Go Developers <owner@bugs.x2go.org>. Last modified: Fri Apr 19 08:37:59 2024; 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.