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 4.0.1.20

Full log


Message #5 received at submit@bugs.x2go.org (full text, mbox, reply):

Received: (at submit) by bugs.x2go.org; 9 Jan 2017 13:35:45 +0000
From frank@igpm.rwth-aachen.de  Mon Jan  9 14:35:44 2017
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
	ymir.das-netzwerkteam.de
X-Spam-Level: 
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 [127.0.0.1])
	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 ([127.0.0.1])
	by localhost (ymir.das-netzwerkteam.de [127.0.0.1]) (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 [134.130.5.186])
	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"; 
   d="scan'208";a="568198992"
Received: from igpm.igpm.rwth-aachen.de ([134.130.161.1])
  by mx-1.rz.rwth-aachen.de with ESMTP; 09 Jan 2017 14:26:06 +0100
Received: from indy5.igpm.rwth-aachen.de ([134.130.161.44])
	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 ([134.130.161.178])
	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
Subject: x2gosqlitewrapper - Session not opening when username starts with a
 number
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
 Thunderbird/45.5.1
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
Version: 4.0.1.20-3.4

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
67c67
<                       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 4.0.1.20-3.4

Sincerly

Frank Knoben


Send a report that this bug log contains spam.


X2Go Developers <owner@bugs.x2go.org>. Last modified: Fri Mar 29 05:47:56 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.