From jogoussard@gmail.com  Fri Jul 25 17:45:36 2014
Received: (at submit) by bugs.x2go.org; 25 Jul 2014 15:45:37 +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=5.0 tests=BAYES_50,FREEMAIL_FROM,
	HTML_MESSAGE,T_DKIM_INVALID autolearn=ham version=3.3.2
Received: from mail-qg0-f50.google.com (mail-qg0-f50.google.com [209.85.192.50])
	by ymir.das-netzwerkteam.de (Postfix) with ESMTPS id F0D625DB51
	for <submit@bugs.x2go.org>; Fri, 25 Jul 2014 17:45:35 +0200 (CEST)
Received: by mail-qg0-f50.google.com with SMTP id q108so5214515qgd.37
        for <submit@bugs.x2go.org>; Fri, 25 Jul 2014 08:45:34 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=mime-version:date:message-id:subject:from:to:content-type;
        bh=52JT142cyBsvmgFFQR6NJp/E6AnqlEYTYn1+epG1xHo=;
        b=Bm6+lHBk0VAhtBpJZ8K48xZYy71IKMwsdkYnZ/ho8zHs4kgSedp/81x1vDbNVeYOry
         7O4sSViqe89Fd6+8Gm05Sz376Rj2IEeRQ3jEF2NjrcXM8lTqqTRbLRvb5N5X2OlLjA3D
         m0HMUApbYSqU1Yoi25QygfLx5/2KRDDvbYRylgj4MD3hZxxas2/Bn0JmCnLJCZy9ZFBl
         p5dElqQMJu7Q4jHvSk09e1HoqB/Je78qgh67N7oLdme20YXO/4JISpD+stMzclOG030k
         7bVZqUgMFQ7UtkwnlLeDyMY6rtx8jJ6+7Do2Qj+/+Luh2wjHQ1rUWKtkFGAJdEnzm0Vn
         mtVw==
MIME-Version: 1.0
X-Received: by 10.224.21.9 with SMTP id h9mr27727091qab.67.1406303134206; Fri,
 25 Jul 2014 08:45:34 -0700 (PDT)
Received: by 10.96.97.98 with HTTP; Fri, 25 Jul 2014 08:45:34 -0700 (PDT)
Date: Fri, 25 Jul 2014 11:45:34 -0400
Message-ID: <CAEpoP_kENqprO5aC_OcqF0=iozuXUWROw8whmEDS+z_U7JdVew@mail.gmail.com>
Subject: Empty $USER env var makes x2go start an infinite loop
From: Jacques-Olivier Goussard <jogoussard@gmail.com>
To: submit@bugs.x2go.org
Content-Type: multipart/alternative; boundary=001a11c2b70ac2cf5704ff067624

--001a11c2b70ac2cf5704ff067624
Content-Type: text/plain; charset=UTF-8

Package: x2goserver
Version: x2goserver.x86_64 4.0.1.13-4.el6
OS: Centos 5

I accidentally stumbled upon this one: if the $USER env var is empty (in my
case that was a bug in my .bashrc that generated that), then X2GO doesn't
properly reject and log the connection attempt. The client freezes in
'Connecting' state and the sqllite scripts seem to enter an infinite loop
trying to do insert session.
Once I kill the x2gostartagent process, I get the list of calls in
x2gosqllitewrapper.pm and can see that the provided session ID is missing
the username part (as USER is empty).
Instead of being stuck in session insertion, the fact that USER is empty
should be caught earlier, properly reported in syslog and session cleanly
rejected.

--001a11c2b70ac2cf5704ff067624
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Package: x2goserver<div>Version:=C2=A0x2goserver.x86_64 4.=
0.1.13-4.el6</div><div>OS: Centos 5</div><div><br></div><div>I accidentally=
 stumbled upon this one: if the $USER env var is empty (in my case that was=
 a bug in my .bashrc that generated that), then X2GO doesn&#39;t properly r=
eject and log the connection attempt. The client freezes in &#39;Connecting=
&#39; state and the sqllite scripts seem to enter an infinite loop trying t=
o do insert session.</div>
<div>Once I kill the x2gostartagent process, I get the list of calls in <a =
href=3D"http://x2gosqllitewrapper.pm">x2gosqllitewrapper.pm</a> and can see=
 that the provided session ID is missing the username part (as USER is empt=
y).</div>
<div>Instead of being stuck in session insertion, the fact that USER is emp=
ty should be caught earlier, properly reported in syslog and session cleanl=
y rejected.</div><div><br></div><div><br></div></div>

--001a11c2b70ac2cf5704ff067624--

