Bug 44352 - Sanitize handling of encoding in S4-Connector
Sanitize handling of encoding in S4-Connector
Status: RESOLVED WONTFIX
Product: UCS
Classification: Unclassified
Component: S4 Connector
UCS 4.2
Other Linux
: P5 normal (vote)
: ---
Assigned To: Samba maintainers
Samba maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2017-04-11 17:32 CEST by Arvid Requate
Modified: 2020-07-03 20:56 CEST (History)
1 user (show)

See Also:
What kind of report is it?: Development Internal
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments
latin1.patch (2.64 KB, patch)
2017-04-11 17:32 CEST, Arvid Requate
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Arvid Requate univentionstaff 2017-04-11 17:32:53 CEST
Created attachment 8770 [details]
latin1.patch

The handling of encoding is not very consistent any more in the S4-Connector code. The attached patch is just cosmetic. In dns.py we probably could receive UTF-16-LE but we don't handle that. Also the naming of the helper functions is opposite to python standard:

s4.encode(self, string)   basically does a string.decode('latin1')
encode_attrib(attrib)     basically does a attrib.decode('utf8')

IMHO all references to 'latin1' are not correct in the general case either. In particular "compatible_modstring" treats everything non-unicode as 'latin1'.


For Bug 44276 I've added an idempotent function unicode_to_utf8 to avoid spreading the dreaded "compatible_modstring" even further.
Comment 1 Ingo Steuwer univentionstaff 2020-07-03 20:56:48 CEST
This issue has been filed against UCS 4.2.

UCS 4.2 is out of maintenance and many UCS components have changed in later releases. Thus, this issue is now being closed.

If this issue still occurs in newer UCS versions, please use "Clone this bug" or reopen it and update the UCS version. In this case please provide detailed information on how this issue is affecting you.