api-platform / api-platform/core

[Security] Return an object instead of an array in collections

Open
#7,986 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
2.6k
Forks
980
Avg merge
2d 5h
Merged PRs (30d)
48

Description

Hi everyone,

what do you think about adding the option to return an object instead of an array in collections? I think it's a good practice in terms of security (see [OWASP](https://www.owasp.org/index.php/AJAX_Security_Cheat_Sheet#Always_return_JSON_with_an_Object_on_the_outside)).

Regards

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.