Skip to content

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

Open
@fg-uulm

Description

@fg-uulm

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

  • Node.js version: v18.20.3
  • Strapi version: 4.14.5
  • Database: sqlite
  • Operating system: Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions