Univention Bugzilla – Bug 38614
sqlite: near "bar": syntax error
Last modified: 2015-06-12 16:58:53 CEST
Ticket #2015052521000289 The connector is unable to synchronize users with a ' in the username. 23.05.2015 02:09:05,52 LDAP (INFO ): _ignore_object: Do not ignore uid=foo'bar,dc=deadlock40,dc=intranet 23.05.2015 02:09:05,52 LDAP (INFO ): __sync_file_from_ucs: objected was added: uid=foo'bar,dc=deadlock40,dc=intranet 23.05.2015 02:09:05,53 LDAP (INFO ): _ignore_object: Do not ignore uid=foo'bar,dc=deadlock40,dc=intranet 23.05.2015 02:09:05,53 LDAP (INFO ): _object_mapping: map with key user and type ucs 23.05.2015 02:09:05,54 LDAP (INFO ): _dn_type ucs 23.05.2015 02:09:05,55 LDAP (WARNING): sqlite: near "bar": syntax error 23.05.2015 02:09:05,55 LDAP (WARNING): sqlite: near "bar": syntax error 23.05.2015 02:09:05,56 LDAP (WARNING): sync failed, saved as rejected /var/lib/univention-connector/s4/1432339740.806956 23.05.2015 02:09:05,56 LDAP (WARNING): Traceback (most recent call last): File "/usr/lib/pymodules/python2.7/univention/s4connector/__init__.py", line 988, in poll_ucs sync_successfull = self.__sync_file_from_ucs(filename, traceback_level=traceback_level) File "/usr/lib/pymodules/python2.7/univention/s4connector/__init__.py", line 796, in __sync_file_from_ucs object = self._object_mapping(key, object, 'ucs') File "/usr/lib/pymodules/python2.7/univention/s4connector/__init__.py", line 1700, in _object_mapping object[dntype] = self.dn_mapped_to_base(object[dntype], self.lo_s4.base) File "/usr/lib/pymodules/python2.7/univention/s4connector/__init__.py", line 448, in dn_mapped_to_base if dn.endswith(base): AttributeError: 'NoneType' object has no attribute 'endswith'
Code: r60890 + r60898 The SQLite Python API now makes the parameter substitution. YAML: 2015-05-28-univention-s4-connector.yaml (r60900) I've added two new test cases (r60899): 52_s4connector/031_sync_special_usernames_in_ucs 52_s4connector/032_sync_special_usernames_in_ad
Created attachment 6927 [details] 1.diff This fixes a quoting typo. In commit r60890 I think encode_sql_option is not required? It's also not used in the second commit.
(In reply to Arvid Requate from comment #2) > Created attachment 6927 [details] > 1.diff > > This fixes a quoting typo. Yes, thanks applied: r60908 > In commit r60890 I think encode_sql_option is not required? It's also not > used in the second commit. Yes, it was removed in the second commit. It was only a first try.
Code review ok, ucs-test cases work and advisory is ok.
<http://errata.univention.de/ucs/4.0/204.html>