mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Do not change LDAPObject objectclass list
__json__ method of LDAPObject may inadvertently append a list of possible objectclasses to a list of basic objectclasses and thus change a behavior of all subsequent LDAPSearch command. The command may only return objects where all "possible" objectclasses are present and thus returning an incomplete list. Make sure that the LDAPObject object_class list is not modified during the __json__ method. https://fedorahosted.org/freeipa/ticket/2906
This commit is contained in:
@@ -635,7 +635,7 @@ class LDAPObject(Object):
|
|||||||
objectclasses = config.get(
|
objectclasses = config.get(
|
||||||
self.object_class_config, objectclasses
|
self.object_class_config, objectclasses
|
||||||
)
|
)
|
||||||
objectclasses += self.possible_objectclasses
|
objectclasses = objectclasses + self.possible_objectclasses
|
||||||
# Get list of available attributes for this object for use
|
# Get list of available attributes for this object for use
|
||||||
# in the ACI UI.
|
# in the ACI UI.
|
||||||
attrs = self.api.Backend.ldap2.schema.attribute_types(objectclasses)
|
attrs = self.api.Backend.ldap2.schema.attribute_types(objectclasses)
|
||||||
|
|||||||
Reference in New Issue
Block a user