-
Bug
-
Resolution: Unresolved
-
High
-
5
-
Severity 3 - Minor
-
2
-
Issue Summary
When calling the /wiki/rest/api/content/{content-id}/property endpoint with the same request body, it's possible to create content properties with duplicate keys via both v1 and v2 APIs. This seems to be a race condition between the two calls, but we also saw sites on which the two properties were created a few minutes apart.
This may cause issues when trying to read and update the property, which affects apps that rely on that functionality.
Steps to Reproduce
- Trigger two POST curl calls in the same command using the same body
- Two properties will be created with the same key.
Expected Results
Only one property is created and the second call is rejected since a property already exists
Actual Results
The properties are created with the same key
Workaround
All GET v2 REST APIs from Content Properties and Space Properties groups, that return a list of properties, have been updated to remove duplicates automatically. If these APIs find duplicates, they will keep only the most recently created content property, based on their creation date.
If, for whatever reason, duplicates are needed in the response, a special undocumented showDuplicates request parameter has been added to all these APIs. If this parameter is set to true, APIs will return unfiltered results with duplicates.
- relates to
-
CONFCLOUD-71704 Multiple content properties with the same key
- Closed