Subject: x2go fails unhelpfully when a session fails to start

From: "Norman Gray" <[email-masked]>
Date: Fri, 27 Oct 2017 18:02:20 +0100

Package: x2goserver
Version: 4.0.1.20

When a username is rejected by the 'valid username' test (see separate 
bug report<https://bugs.x2go.org/cgi-bin/bugreport.cgi?bug=1229>), the 
session doesn't fail, but simply seems to hang, giving no feedback about 
the problem, nor, as far as I can see, reporting anything in the logs.

To reproduce, attempt to log in using a username such as '123x'.  The 
session doesn't complete the setup, leaving the user at a blank screen.

Suggestion: a user-visible error message should be produced, and an 
informative message sent to the system log.

Best wishes,

Norman

-- 
Norman Gray  :  https://nxg.me.uk

---

From: Mihai Moldovan <[email-masked]>
Date: Thu, 2 Nov 2017 20:08:41 +0100

Control: tag -1 -pending
Control: notfixed -1 4.0.1.21

> informative message sent to the system log.

I've tried catching errors while inserting values into the database, but it
turns out that doing this is not easily possible, since the current code relies
on brute-force adding of new DB entries and ignoring errors until it succeeds.
If a hard error occurs that will make any insertion fail, of course this will
loop forever.

I'll need to implement something more sophisticated that detects hard errors
which will always lead to failures.

Mihai