From unknown Fri Mar 29 09:06:33 2024 X-Loop: owner@bugs.x2go.org Subject: Bug#1131: x2gosqlitewrapper - Session not opening when username starts with a number Reply-To: Frank Knoben , 1131@bugs.x2go.org Resent-From: Frank Knoben 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: Resent-Sender: owner@bugs.x2go.org X-X2Go-PR-Message: report 1131 X-X2Go-PR-Package: x2gosqlitewrapper X-X2Go-PR-Keywords: 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 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 ; 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 ; 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 ; 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 ) 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 ) id 1cQZxc-000CSD-Ou for submit@bugs.x2go.org; Mon, 09 Jan 2017 14:26:04 +0100 From: Frank Knoben 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 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