Univention Bugzilla – Full Text Bug Listing |
Summary: | prevent wrong uldap class | ||
---|---|---|---|
Product: | UCS | Reporter: | Florian Best <best> |
Component: | UDM (Generic) | Assignee: | Johannes Keiser <keiser> |
Status: | CLOSED FIXED | QA Contact: | Florian Best <best> |
Severity: | normal | ||
Priority: | P5 | CC: | hahn, klaeser, troeder |
Version: | UCS 4.1 | Flags: | best:
Patch_Available+
|
Target Milestone: | UCS 4.2-1-errata | ||
Hardware: | Other | ||
OS: | Linux | ||
See Also: |
http://forge.univention.org/bugzilla/show_bug.cgi?id=41836 https://forge.univention.org/bugzilla/show_bug.cgi?id=43550 |
||
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: | 2017021521000568 | Bug group (optional): | Error handling, External feedback, Troubleshooting |
Max CVSS v3 score: | |||
Attachments: | patch |
Description
Florian Best
2016-05-27 11:13:57 CEST
What about logging an error/warning instead? This would not change the behavior of existing code, however, it would make it possible to identify code that uses univention.uldap.access directly. (In reply to Alexander Kläser from comment #1) > What about logging an error/warning instead? This would not change the > behavior of existing code, however, it would make it possible to identify > code that uses univention.uldap.access directly. There is no existing and must not be code which uses the wrong class. Stumbled upon this - again! Please at least make univention.uldap.get*Connection() log *deprecated* to some log, so developers don't loose time debugging strange behavior. Version: 4.1-4 errata396 (Vahr) Remark: install kopano webapp Traceback(d80c9ae519825655f84df2e8d746fffa): Execution of command 'appcenter/invoke_dry_run' has failed: Traceback (most recent call last): File "%PY2.7%/univention/management/console/base.py", line 281, in execute function(self, request) File "%PY2.7%/univention/management/console/modules/appcenter/__init__.py", line 341, in invoke_dry_run self.invoke(request) File "%PY2.7%/univention/management/console/modules/appcenter/__init__.py", line 129, in _deferred return func(self, *args, **kwargs) File "%PY2.7%/univention/management/console/modules/decorators.py", line 656, in _decorated return function(self, request, *args, **kwargs) File "%PY2.7%/univention/management/console/modules/decorators.py", line 190, in _response return function(self, request) File "%PY2.7%/univention/management/console/modules/appcenter/__init__.py", line 515, in invoke forbidden, warnings = application.check_invokation(function, self.package_manager) File "%PY2.7%/univention/management/console/modules/appcenter/app_center.py", line 1244, in check_invokation return _check(True), _check(False) File "%PY2.7%/univention/management/console/modules/appcenter/app_center.py", line 1240, in _check reason = method(**kwargs) File "%PY2.7%/univention/management/console/modules/appcenter/app_center.py", line 1169, in must_have_no_unmet_dependencies app = app.to_dict(package_manager, domainwide_managed=True) File "%PY2.7%/univention/management/console/modules/decorators.py", line 648, in wrapper return func(*args, **kwargs) File "%PY2.7%/univention/management/console/modules/appcenter/app_center.py", line 1009, in to_dict res['installations'] = self.get_installations(hosts) File "%PY2.7%/univention/management/console/ldap.py", line 141, in _decorated result = func(*args, **kwargs) File "%PY2.7%/univention/management/console/modules/appcenter/app_center.py", line 961, in get_installations app_objs = appcenter_udm_module.lookup(None, lo, None, base=self.ldap_container) File "%PY2.7%/univention/admin/handlers/appcenter/app.py", line 391, in lookup res.append(object(co, lo, None, dn, attributes=attrs)) File "%PY2.7%/univention/admin/handlers/appcenter/app.py", line 362, in __init__ univention.admin.handlers.simpleLdap.__init__(self, co, lo, position, dn, superordinate, attributes=attributes) File "%PY2.7%/univention/admin/handlers/__init__.py", line 592, in __init__ self._validate_superordinate() File "%PY2.7%/univention/admin/handlers/__init__.py", line 622, in _validate_superordinate if self.dn and not self._ensure_dn_in_subtree(self.superordinate.dn, self.lo.parentDn(self.dn)): File "%PY2.7%/univention/admin/handlers/__init__.py", line 627, in _ensure_dn_in_subtree if self.lo.lo.compare_dn(dn, parent): File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 136, in __getattr__ self.__class__.__name__,repr(name) AttributeError: ReconnectLDAPObject has no attribute 'compare_dn' (In reply to Florian Best from comment #0) > Created attachment 7695 [details] > patch > Applied patch: r 80941 univention-directory-manager-modules (12.0.17-68) * Bug #41368: Applied patch from Florian Best - Prevent the direct use of univention.uldap.access in UDM YAML: r 80943 It seems mail/univention-mail-dovecot/modules/univention/mail/dovecot_shared_folder.py and in some ucs-test scripts this is used wrong. I will fix the test cases. As an alternative I would suggest to log an ERROR and execute lo=univention.admin.uldap.access(lo=lo) if isinstance(lo, univention.uldap.access). Applied patch: r 80952 univention-mail-dovecot (3.0.1-2) * Bug #41368: Applied patch from Florian Best - Use univention.admin.uldap instead of univention.uldap YAML: r 80953 r 80957 univention-directory-manager-modules (12.0.17-69) * Bug #41368: Use univention.admin.uldap.access if univention.uldap.access is used and log deprecated warning OK: backwards compatibility OK: wrong use is now gracefully treated OK: mail listener OK: YAML (adjusted in r81017) |