Bug 42403

Summary: make debugging of invalid dn syntax bugs easy
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 Flags: best: Patch_Available+
Version: UCS 4.2   
Target Milestone: UCS 4.2-1-errata   
Hardware: Other   
OS: Linux   
What kind of report is it?: Bug Report What type of bug is this?: 2: Improvement: Would be a product improvement
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.046 Enterprise Customer affected?:
School Customer affected?: ISV affected?:
Waiting Support: Flags outvoted (downgraded) after PO Review:
Ticket number: Bug group (optional): Cleanup, Error handling, Troubleshooting
Max CVSS v3 score:
Attachments: patch

Description Florian Best univentionstaff 2016-09-15 13:13:34 CEST
Created attachment 8011 [details]
patch

Print the DN in the exception. Otherwise we don't get enough information and waste a lot of time (multiple hours) in debugging.
Comment 1 Johannes Keiser univentionstaff 2017-07-03 17:21:00 CEST
(In reply to Florian Best from comment #0)
> Created attachment 8011 [details]
> patch
> 
> Print the DN in the exception. Otherwise we don't get enough information and
> waste a lot of time (multiple hours) in debugging.

Applied patch:

r 80797
univention-directory-manager-modules (12.0.17-53) 
* Bug #42403: Applied patch from Florian Best - Print DN in
INVALID_DN_SYNTAX exceptions

YAML: r 80798
Comment 2 Florian Best univentionstaff 2017-07-03 17:34:52 CEST
OK: fix adds more information to exceptions
OK: YAML (adjusted in r80804)

>>> import univention.admin.uldap
>>> lo, po = univention.admin.uldap.getMachineConnection()
>>> lo.searchDn(base='cn=foo,None')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/pymodules/python2.7/univention/admin/uldap.py", line 462, in searchDn
    raise univention.admin.uexceptions.ldapError('%s: %s' % (_err2str(msg), base), original_exception=msg)
univention.admin.uexceptions.ldapError: Invalid DN syntax: invalid DN: cn=foo,None
Comment 3 Janek Walkenhorst univentionstaff 2017-07-05 13:06:30 CEST
<http://errata.software-univention.de/ucs/4.2/79.html>