Bug 5926 - vsmserver traceback on login with unicode username
Summary: vsmserver traceback on login with unicode username
Status: CLOSED DUPLICATE of bug 4316
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: VSM Server (show other bugs)
Version: trunk
Hardware: PC Unknown
: P2 Normal
Target Milestone: 4.14.0
Assignee: Bugzilla mail exporter
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-03 10:40 CEST by Karl Mikaelsson
Modified: 2022-01-03 16:26 CET (History)
1 user (show)

See Also:
Acceptance Criteria:


Attachments

Description Karl Mikaelsson cendio 2016-06-03 10:40:37 CEST
While testing bug 3153, I had configured my ThinLinc  server with a non-UTF-8 locale:

> [root@dhcp-253-255 ~]# cat /proc/$(ps -ef | grep "[v]smserver" | awk '{print $2}')/environ | tr '\0' '\n' | egrep "(LANG|LC_.*)"
> LC_NUMERIC=sv_SE.iso885915
> LC_MESSAGES=C
> LC_COLLATE=sv_SE.iso885915
> LANG=sv_SE.iso885915
> LC_CTYPE=C
> LC_TIME=sv_SE.iso885915

When trying to log in with the username ☭, tlclient inactivates the input fields and the buttons and just sits there with the "Connecting to server <server>" message in the message bar. Last lines in tlclient.log:

> 2016-06-03T10:33:49: Calling XML-RPC method 'get_capabilities'
> 2016-06-03T10:33:49: Calling XML-RPC method 'get_user_sessions'

vsmserver.log contains this traceback:

> 2016-06-03 10:23:52 ERROR vsmserver: Unhandled XMLRPC exception: <type 'exceptions.UnicodeDecodeError'> 'ascii' codec can't decode byte 0xe2 in position 0: ordinal not in range(128) Traceback (most recent call last):
>   File "/opt/thinlinc/modules/thinlinc/vsm/async.py", line 112, in iii11
>     obj . handle_read_event ( )
>   File "/usr/lib64/python2.7/asyncore.py", line 449, in handle_read_event
>     self.handle_read()
>   File "/usr/lib64/python2.7/asynchat.py", line 140, in handle_read
>     self.found_terminator()
>   File "/opt/thinlinc/modules/thinlinc/vsm/xmlrpc.py", line 530, in found_terminator
>     self . handle_request ( )
>   File "/opt/thinlinc/modules/thinlinc/vsm/xmlrpc.py", line 544, in handle_request
>     self . handle_method ( )
>   File "/opt/thinlinc/modules/thinlinc/vsm/usersocketserverchannel.py", line 75, in handle_method
>     self . uid )
>   File "/opt/thinlinc/modules/thinlinc/vsm/handler_getusersessions.py", line 31, in handle
>     if self . sameuser_or_shadower ( I1IiI , uid ) :
>   File "/opt/thinlinc/modules/thinlinc/vsm/vsmcommon.py", line 426, in sameuser_or_shadower
>     oo = self . uid2username ( uid )
>   File "/opt/thinlinc/modules/thinlinc/vsm/vsmcommon.py", line 395, in uid2username
>     Ii1IIiI1i = locale_decode ( o0iI11I1II . pw_name )
>   File "/opt/thinlinc/modules/thinlinc/ctccommon.py", line 415, in locale_decode
>     return s . decode ( OOooo0oOO0O )
> UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 0: ordinal not in range(128)

vsmserver will keep processing new requests, but the user is unable to login with no option to cancel other than waiting for a (tcp?) timeout.
Comment 1 Karl Mikaelsson cendio 2016-06-03 16:32:01 CEST
(In reply to comment #0)
> [...] no option to cancel other than waiting for a (tcp?) timeout.

I was wrong - there is apparently no timeout in the client for this. It'll keep waiting until the server restarts or your connection is dropped for any other reason.
Comment 2 Pierre Ossman cendio 2022-01-03 16:26:01 CET

*** This bug has been marked as a duplicate of bug 4316 ***

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