strapi-plugin-content-versioning
strapi-plugin-content-versioning copied to clipboard
When used together with populate=deep plugin, ALL versions are always returned by API
Bug report
Describe the bug
When using this plugin together with https://github.com/Barelydead/strapi-plugin-populate-deep all existing versions of a content item are returned by the API, also regardless of their publication state. This slows down responses considerably e.g. with 10+ older versions existing and bloats responses extremely, and also poses a data security issue as removed data is still accessible in old versions through the API.
Steps to reproduce the behavior
- Setup strapi with this plugin and the plugin mentioned above
- Create some content type and a piece of content, create some versions by changing stuff
- Request the content from the API using
?populate=deep
query - Inspect JSON, see full version array
- Optional: add
previewState=live
to the query - nothing changes
Expected behavior
Have older draft state versions not exposed through the API, also when using populate=deep
System
- Node.js version: v18.20.3
- Strapi version: 4.14.5
- Database: sqlite
- Operating system: Linux