Bug 45096 - univention.admin.objects.get() opens any DN with any module
univention.admin.objects.get() opens any DN with any module
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UDM (Generic)
UCS 5.0
Other Linux
: P3 minor (vote)
: UCS 5.0
Assigned To: Florian Best
Philipp Hahn
:
Depends on: 30368
Blocks:
  Show dependency treegraph
 
Reported: 2017-07-28 14:20 CEST by Florian Best
Modified: 2021-05-25 16:02 CEST (History)
9 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 4: Minor Usability: Impairs usability in secondary scenarios
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.091
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): API change
Max CVSS v3 score:
best: Patch_Available+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Best univentionstaff 2017-07-28 14:20:57 CEST
Using univention.admin.objects.get(wrong_module, dn=dn) with a wrong object-type for a specific DN or even initializing an wrong_module.object(dn=dn) doesn't raise an error currently.

Since Bug #30368 there is a check if the object type matches which logs an error message if not.
We should raise the univention.admin.uexceptions.wrongObjectType() exception instead.

The change is an API change and should be done in the next minor release (or maybe patchlevel release).

+++ This bug was initially created as a clone of Bug #30368 +++
Comment 1 Lukas Zumvorde univentionstaff 2020-05-13 11:48:51 CEST
I also got confused by getting a weird error because of this.
Comment 2 Florian Best univentionstaff 2020-07-14 12:43:46 CEST
univention-directory-manager-modules (15.0.2-3)
 Bug #45096: check if object matches object type

changelog-5.0-0.xml
 Changelog Bug #45096
Comment 3 Philipp Hahn univentionstaff 2020-07-20 17:13:42 CEST
BEFORE: udm computers/domaincontroller_backup modify --dn "$(ucr get ldap/hostdn)" --set description="$(date)"
OK: The object type of this object differs from the specified object type: The object cn=m34,cn=dc,cn=computers,dc=phahn,dc=dev is not a computers/domaincontroller_backup.
OK: udm computers/computer list
OK: 51_invalid_ldap_users_robust.py

FIXED: fa5d5bfa4946 -> 2f44980f7a74
Comment 4 Florian Best univentionstaff 2021-05-25 16:02:30 CEST
UCS 5.0 has been released:
 https://docs.software-univention.de/release-notes-5.0-0-en.html
 https://docs.software-univention.de/release-notes-5.0-0-de.html

If this error occurs again, please use "Clone This Bug".