Univention Bugzilla – Full Text Bug Listing |
Summary: | Trying to create an existing group does not raise udm_errors.objectExists | ||
---|---|---|---|
Product: | UCS | Reporter: | Dirk Wiesenthal <wiesenthal> |
Component: | App Center | Assignee: | Dirk Wiesenthal <wiesenthal> |
Status: | CLOSED FIXED | QA Contact: | Florian Best <best> |
Severity: | normal | ||
Priority: | P5 | CC: | best |
Version: | UCS 4.1 | ||
Target Milestone: | UCS 4.1-4-errata | ||
Hardware: | Other | ||
OS: | Linux | ||
See Also: | https://forge.univention.org/bugzilla/show_bug.cgi?id=43148 | ||
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?: | 1: Will affect a very 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.023 | 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: | patch |
Description
Dirk Wiesenthal
2016-11-11 00:29:25 CET
See management/univention-directory-manager-modules/modules/univention/admincli/admin.py +745. This bug - if it is correct usage of UDM - will probably also affect ucs-test. Created attachment 8219 [details]
patch
If you want to get the objectExists exception you need to pass a DN.
This is not done in the current code, so you will never get objectExists!
I attached a patch which does what you want, it's not very nice but with the current function signature only this is possible.
The patch also fixes another misusage:
The code operates on obj.info directly. This must not be done. It causes that no syntax validations are done and even more validations like:
* property may not change
* property is required but not set
* property is not allowed to change on AD-objects
* it's not detected that a default value is overwritten, leading to followup-errors if the object is further used
* singlevalue properties might contain multiple entries
* property value has an invalid syntax
* property value with wrong encoding might be written into LDAP
management/univention-appcenter/umc/python/appcenter/app_center.py:» » » » container_obj.info['name'] = container → Also has to be fixed. For now, it somehow does not matter. Needs to be fixed eventually, because more UDM objects will be created by univention-appcenter (like settings/extended_attribute) univention-appcenter 5.0.23-18.246.201612081850 OK: fix ~OK: YAML (very technical but it is technical) OK: workaround for Bug #43148 |