Bug 7613 - Non-ASCII username gives unhandled error on Ubuntu Latin-9 system
Summary: Non-ASCII username gives unhandled error on Ubuntu Latin-9 system
Status: CLOSED FIXED
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: Web Access (show other bugs)
Version: trunk
Hardware: PC Linux Ubuntu
: P2 Normal
Target Milestone: 4.13.0
Assignee: Frida Flodin
URL:
Keywords: prosaic
Depends on: 4586
Blocks:
  Show dependency treegraph
 
Reported: 2020-12-17 13:42 CET by Frida Flodin
Modified: 2021-07-22 12:34 CEST (History)
1 user (show)

See Also:
Acceptance Criteria:


Attachments

Description Frida Flodin cendio 2020-12-17 13:42:17 CET
I have tested to create a user named 'testör' on both Ubuntu20.04 and Ubuntu16.04, with locale set to sv_SE.ISO-8859-15. When trying to start a session with tlwebaccess I get the following in vsmserver log: 

> 2020-12-17 07:56:26 INFO vsmserver.session: User with uid 1001 (testör) requested a new session
> 2020-12-17 07:56:28 INFO vsmserver.session: Session 127.0.0.1:11 created for user testör
> 2020-12-17 07:56:28 WARNING vsmserver.session: Failed to get client ip for the session
> 2020-12-17 07:56:33 ERROR vsmserver: Unhandled XMLRPC exception: <class 'thinlinc.vsm.xmlrpc.XMLDeMarshallingError'> ['not well-formed (invalid token): line 6, column 19', "<?xml
>  version='1.0'?>\n<methodCall>\n<methodName>get_public_sessioninfo</methodName>\n<params>\n<param>\n<value><string>test\xf6r</string></value>\n</param>\n<param>\n<value><string>1
> 0.48.2.191</string></value>\n</param>\n<param>\n<value><int>11</int></value>\n</param>\n</params>\n</methodCall>\n"] Traceback (most recent call last):
>   File "/opt/thinlinc/modules/thinlinc/vsm/async.py", line 105, in i1Iii
>     obj . handle_read_event ( )
>   File "/usr/lib/python2.7/asyncore.py", line 449, in handle_read_event
>     self.handle_read()
>   File "/usr/lib/python2.7/asynchat.py", line 147, in handle_read
>     self.found_terminator()
>   File "/opt/thinlinc/modules/thinlinc/vsm/xmlrpc.py", line 543, in found_terminator
>     self . handle_request ( )
>   File "/opt/thinlinc/modules/thinlinc/vsm/xmlrpc.py", line 555, in handle_request
>     raise XMLDeMarshallingError , [ str ( O0oOo00o ) , self . payload ]
> XMLDeMarshallingError: ['not well-formed (invalid token): line 6, column 19', "<?xml version='1.0'?>\n<methodCall>\n<methodName>get_public_sessioninfo</methodName>\n<params>\n<pa
> ram>\n<value><string>test\xf6r</string></value>\n</param>\n<param>\n<value><string>10.48.2.191</string></value>\n</param>\n<param>\n<value><int>11</int></value>\n</param>\n</para
> ms>\n</methodCall>\n"]

On Ubuntu20.04 the session is disconnected immediately but on Ubuntu16.04 a session is created successfully despite the error. I have also verified that I get the exact same error on both systems. Tested on tl-4.12.0 server and nightly build 6688, same results.
Comment 1 Pierre Ossman cendio 2020-12-17 14:20:49 CET
Seeing the same thing on Ubuntu 18.04, also with ISO 8859-15. Only happens once after the profile chooser, so I guess it's when it starts fetching session info to set up local drives and such.

Should hopefully be resolved once everything is Python 3 (bug 4586).
Comment 2 Samuel Mannehed cendio 2021-03-30 12:28:55 CEST
I could eventually reproduce the bug with ThinLinc 4.12.1 on Ubuntu 20.04 with sv_SE.ISO-8859-15.

To set the locale I had to do the following:

 * install 'language-pack-se'
 * edit '/etc/locale.gen' to remove the comment from the 'sv_SE.ISO-8859-15 ISO-8859-15'-line
 * run 'locale-gen'
 * switch locale using 'localectl set-locale sv_SE.ISO-8859-15'
 * reboot.

To properly add users with these characters I had to use xterm locally when doing useradd on the server. Gnome-terminal has a bug causing everything to be UTF-8, and SSH will try to bring your local locale to the the remote.

The session crashes and I see the above mentioned traceback in the vsmserver.log.

---

Unfortunately the crash remains even with the nightly build server (1983).
Comment 4 Samuel Mannehed cendio 2021-06-14 12:34:01 CEST
Just to reiterate - we aim to retest this bug once tl-mount-localdrives and tl-wait-smartcard have been converted to Python 3. The theory is that the conversion will fix things for us.
Comment 5 Frida Flodin cendio 2021-07-08 10:32:51 CEST
I can verify that this has now been fixed with bug 4586 and bug 7729. Tested build 2204 on Ubuntu 20.04. No traceback.

To clarify the session gets disconnected even after this is fixed. But that is not ThinLinc specific. When trying to create a session locally on Ubuntu 20.04 it does not work with non-ASCII usernames.

Note You need to log in before you can comment on or make changes to this bug.