Bug 6088 - Client sends es_ES@modern locale, which is not supported on Linux
Summary: Client sends es_ES@modern locale, which is not supported on Linux
Status: NEW
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: Client (show other bugs)
Version: trunk
Hardware: PC Unknown
: P2 Normal
Target Milestone: LowPrio
Assignee: Pierre Ossman
URL:
Keywords:
Depends on: 5105
Blocks:
  Show dependency treegraph
 
Reported: 2016-11-09 13:24 CET by Peter Åstrand
Modified: 2018-09-18 13:05 CEST (History)
1 user (show)

See Also:
Acceptance Criteria:


Attachments

Description Peter Åstrand cendio 2016-11-09 13:24:25 CET
In some cases, the Windows client sends a localename of es_ES@modern. This causes tl-select-profile to crasch:

Running /opt/thinlinc/etc/xstartup.d/20-tl-select-profile.sh (Choosing a profile)
Traceback (most recent call last):
  File "/opt/thinlinc/libexec/tl-select-profile", line 298, in <module>
    locale . setlocale ( locale . LC_ALL , "" )
  File "/usr/lib64/python2.6/locale.py", line 513, in setlocale
    return _setlocale(category, locale)
locale.Error: unsupported locale setting
tl-xinit: client terminated and returned 0

The crash problem is bug 4512. However, I believe it is also incorrect for our client to send es_ES@modern in the first place. This is what our localename.c says:

    case LANG_SPANISH:
        switch (sub) {
        case SUBLANG_SPANISH:
            return "es_ES";
        case SUBLANG_SPANISH_MEXICAN:
            return "es_MX";
        case SUBLANG_SPANISH_MODERN:
            return "es_ES@modern";      /* not seen on Unix */

IOW, it seems to me that we should not send locale names which are not available on Linux.
Comment 2 Pierre Ossman cendio 2017-07-04 11:11:51 CEST
OTOH, we can't really know from the client what the server supports, so this should probably be fixed server side. See bug 5105.

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