notum-cz / strapi-plugin-content-versioning

This plugin enables content versioning in Strapi
129 stars 46 forks source link

When used together with populate=deep plugin, ALL versions are always returned by API #216

Open fg-uulm opened 4 months ago

fg-uulm commented 4 months ago

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

  1. Setup strapi with this plugin and the plugin mentioned above
  2. Create some content type and a piece of content, create some versions by changing stuff
  3. Request the content from the API using ?populate=deep query
  4. Inspect JSON, see full version array
  5. 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