Bug 44369 - Rejects for non-ascii accounts are not handled properly due to sqlite encoding problem
Rejects for non-ascii accounts are not handled properly due to sqlite encodin...
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: S4 Connector
UCS 4.2
Other Linux
: P5 normal (vote)
: UCS 4.2-3-errata
Assigned To: Arvid Requate
Felix Botner
:
Depends on:
Blocks: 44291 45226 47013
  Show dependency treegraph
 
Reported: 2017-04-13 14:36 CEST by Arvid Requate
Modified: 2018-05-15 18:36 CEST (History)
3 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 3: Simply Wrong: The implementation doesn't match the docu
Who will be affected by this bug?: 2: Will only affect a few installed domains
How will those affected feel about the bug?: 2: A Pain – users won’t like this once they notice it
User Pain: 0.069
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Arvid Requate univentionstaff 2017-04-13 14:36:39 CEST
We should also fix this in UCS 4.2


+++ This bug was initially created as a clone of Bug #44291 +++

If there is a reject for a DN containing non-ascii characters, then the reject cannot be saved into the corresponding sqlite database table. As a result it's not shown as reject and the S4-Connector is contantly trying to sync that object, spamming the s4-cconector.log:


========================================================================
03.05.2016 01:33:13,727 LDAP        (PROCESS): sync from ucs: [         group] [       add] cn=Domänen Gruppe,cn=groups,DC=ar41i2,DC=qa
03.05.2016 01:33:13,754 LDAP        (ERROR  ): sync_from_ucs: traceback during add object: cn=Domänen Gruppe,cn=groups,DC=ar41i2,DC=qa
03.05.2016 01:33:13,754 LDAP        (ERROR  ): sync_from_ucs: traceback due to addlist: [('objectClass', ['top', 'group']), ('groupType', [u'-2147483646']), ('sAMAccountName', [u'Dom\xe4nen Gruppe'])]
03.05.2016 01:33:13,754 LDAP        (WARNING): sqlite: You must not use 8-bit bytestrings unless you use a text_factory that can interpret 8-bit bytestrings (like text_factory = str). It is highly recommended that you instead just switch your application to Unicode strings.
03.05.2016 01:33:13,755 LDAP        (WARNING): sqlite: You must not use 8-bit bytestrings unless you use a text_factory that can interpret 8-bit bytestrings (like text_factory = str). It is highly recommended that you instead just switch your application to Unicode strings.
03.05.2016 01:33:13,756 LDAP        (WARNING): sync failed, saved as rejected
        /var/lib/univention-connector/s4/1462231951.138939
========================================================================


+++ This bug was initially created as a clone of Bug #44276 +++
Comment 1 Arvid Requate univentionstaff 2018-01-15 16:07:52 CET
Patch merged from UCS 4.1.
Advisory: univention-s4-connector.yaml
Comment 2 Felix Botner univentionstaff 2018-01-16 14:42:43 CET
@@ -188,7 +188,7 @@ class configdb:
                                cur.close()
                                return
                        except lite.Error, e:
-                               ud.debug(ud.LDAP, ud.WARN, "sqlite: %s" % e)
+                               ud.debug(ud.LDAP, ud.ERROR, "sqlite: %s" % e)
                                if self._dbcon:
                                        self._dbcon.close()
                                self._dbcon = lite.connect(self.filename)

this one too?

please merge to 4.3-0
Comment 3 Arvid Requate univentionstaff 2018-01-16 14:58:46 CET
Ok, merged and rebuilt.
Comment 4 Felix Botner univentionstaff 2018-01-16 19:33:31 CET
OK - patch
OK - univention-s4-connector
OK - YAML
OK - merged to 4.3
Comment 5 Erik Damrose univentionstaff 2018-01-17 14:21:20 CET
<http://errata.software-univention.de/ucs/4.2/263.html>