Subject: Domain\User notation for fails due to missing quotation of "\"
From: Thomas Wagner <[email-masked]>
To: [email-masked]
Date: Thu, 06 Nov 2014 15:11:47 +0100

Package: x2goserver
Version 4.0.1.18

Hi folks,

I'm using x2goserver on an openSUSE 13.1 which is a member in an
AD-Domain. Thus is have usernames like "DOMAIN\USER".  Logging in with
SSH works fine but starting x2go fails. For some users I get errors like
MYDOMAIN\student is not authorized at /usr/lib/x2go/x2gosqlitewrapper.pl
line 527.
: /usr/lib/x2go/x2gosqlitewrapper insertsession 60 cd-sim
MYDOMAINstudent-60-1415280062 at /usr/lib64/x2go/x2godbwrapper.pm line 320.

For other users it works. I tracked the problem down to line 525 in
x2gosqlitewrapper.pl. The line is:
$user =~ s/$realuser-[0-9]{2,}-[0-9]{10,}.*/$realuser/;

$realuser is a string like  "MYDOMAIN\student". This is what makes the
regex fail since \s is a special escape sequence in perl. Also usernames
with other special escape sequences like \k fail.

best regards

Thomas

-- 
Dipl.-Ing. Thomas Wagner
Institute for Communications and Information Engineering
Johannes Kepler University Linz, 4040 Linz, Austria
mailto: [email-masked]
Phone: +43 732 2468 6404
http://www.nthfs.jku.at