Bug 42623 - ucs-school-computer-room: encoding error in display name
ucs-school-computer-room: encoding error in display name
Status: CLOSED DUPLICATE of bug 38415
Product: UCS@school
Classification: Unclassified
Component: UMC - Computer room administration
UCS@school 4.1 R2
Other Linux
: P5 normal (vote)
: ---
Assigned To: Florian Best
Daniel Tröder
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2016-10-11 11:13 CEST by Daniel Tröder
Modified: 2017-01-09 15:11 CET (History)
2 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 1: Cosmetic issue or missing function but workaround exists
Who will be affected by this bug?: 3: Will affect average number of installed domains
How will those affected feel about the bug?: 1: Nuisance – not a big deal but noticeable
User Pain: 0.017
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): Internationalization
Max CVSS v3 score:


Attachments
screenshot: error with german umlauts (35.94 KB, image/png)
2016-10-11 11:13 CEST, Daniel Tröder
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Tröder univentionstaff 2016-10-11 11:13:37 CEST
Created attachment 8081 [details]
screenshot: error with german umlauts

The display of the logged in user in the UMC computer room module displays an error � for german umlauts (see attachment).
Comment 1 Florian Best univentionstaff 2016-10-11 11:29:20 CEST
Where does the user come from?
UCS is UTF-8 only and this is latin-1. Our code should never produce such usernames.
Comment 2 Daniel Tröder univentionstaff 2016-10-11 11:55:35 CEST
The user was created using the UCS@school UMC user module.
My guess is, that the displayed name is provided by italc.
Comment 3 Daniel Tröder univentionstaff 2016-10-11 11:56:46 CEST
It's the 'firstname'.
Comment 4 Florian Best univentionstaff 2016-10-11 12:01:41 CEST
cn:: U2Now7xsZXIgRWlucw==
gecos: Schueler Eins
displayName:: U2Now7xsZXIgRWlucw==
sn: Eins
givenName:: U2Now7xsZXI=

The encoding in LDAP is correct (b'Sch\xc3\xbcler Eins')
Comment 5 Florian Best univentionstaff 2016-10-11 12:22:49 CEST
The HTTP Response of the update/ request is:

{"status": 200, "message": null, "result": {"computers": [{"InputLock": null, "DemoClient": null, "name": "win01", "ip": "10.200.3.3", "MessageBox": null, "DemoServer": null, "ScreenLock": null, "mac": "52:54:00:98:3f:b4", "connection": "connected", "user": "schul1 (Sch\ufffdler Eins)", "id": "win01", "objectType": "computers/windows", "teacher": false, "description": null}], "locked": false, "user": "uid=Administrator,cn=users,dc=uni,dc=dtr"}}

So it's already wrong in the backend.

ITALC says that:
repr(ITALC_Computer().user.current) is 'schul1 (Sch\xef\xbf\xbdler Eins)'
>>> 'Sch\xef\xbf\xbdler'.decode('utf-8')
u'Sch\ufffdler'

I guess the fix is this one:
https://github.com/iTALC/italc/commit/30d1d792b393ef81c5d79fcc239ba8568af3436f
Comment 6 Florian Best univentionstaff 2016-10-13 14:22:09 CEST
@Daniel
Could you verify this patch by installing the iTALC 3.0 client from https://github.com/iTALC/italc/releases on your windows machine?
I will merge the latest patches into our iTALC then, too.
Comment 7 Florian Best univentionstaff 2016-10-13 15:49:18 CEST
(In reply to Florian Best from comment #6)
> @Daniel
> Could you verify this patch by installing the iTALC 3.0 client from
> https://github.com/iTALC/italc/releases on your windows machine?
> I will merge the latest patches into our iTALC then, too.
Oh the patch is only part of iTALC 3.0.1 which is not released and built yet.
Comment 8 Sönke Schwardt-Krummrich univentionstaff 2016-10-17 10:12:03 CEST
Is it worth reopening 38213 and merge the most recent commits (~20)?
Comment 9 Florian Best univentionstaff 2016-10-17 11:08:35 CEST
(In reply to Sönke Schwardt-Krummrich from comment #8)
> Is it worth reopening 38213 and merge the most recent commits (~20)?
Yes!
Comment 10 Florian Best univentionstaff 2016-10-17 12:53:09 CEST

*** This bug has been marked as a duplicate of bug 38415 ***
Comment 11 Daniel Tröder univentionstaff 2016-10-25 14:36:31 CEST
Bug was fixed as part of Bug #38415.

A student with firstname=Stüdén and lastname=TÖne displays correctly
Comment 12 Florian Best univentionstaff 2017-01-09 15:11:45 CET
UCS@school 4.1 R2 v7 has been released.

http://docs.software-univention.de/changelog-ucsschool-4.1R2v7-de.html

If this error occurs again, please clone this bug.