23 Commits

Author SHA1 Message Date
Alexandre BODIN
942e646d28
Perf optimizations (#16117)
Co-authored-by: Marc-Roig <marc12info@gmail.com>
2023-03-21 18:37:21 +01:00
Convly
3351b78b5b Prettier fix 2023-03-20 10:16:31 +01:00
Convly
fbb22891a8 Allow to sort by ID in the sort sanitize operations 2023-03-20 10:11:33 +01:00
Ben Irvin
801e3db415 add traverse query
fix single type

fix query

sanitize pagination count params

add comments

Cleanup the params/filters sanitize helpers

sanitize association resolver

Sanitize sort

fix graphql single type

fix graphql types

fix addFindQuery

Sanitize fields

Update sanitize sort to handle all the different formats

Update fields sanitize to handle regular strings & wildcard

Fix non scalar recursion

Add a traverse factory

Add visitor to remove dz & morph relations

Replace the old traverse utils (sort, filters) by one created using the traverse factory

add sanitize populate

await args

fix async and duplicate sanitization

sanitize u&p params

Add traverse fields

Fix traverse & sanitize fields

add traverse fields to nested populate

sanitize admin api filter queries

Co-authored-by: Jean-Sébastien Herbaux <Convly@users.noreply.github.com>

sanitize sort params in admin API

todo

make token fields unsearchable with _q

sanitize delete mutation

Update packages/core/admin/server/services/permission/permissions-manager/sanitize.js

Co-authored-by: Jamie Howard <48524071+jhoward1994@users.noreply.github.com>

fix errors on queries without ctx

rename findParams to sanitizedParams

Sanitize queries everywhere in the content manager admin controllers

sanitize single type update and delete

Ignore non attribute keys in the sanitize sort

Fix the sanitize query sort for nested string sort

Fix permission check for the admin

typo

sanitize upload

sanitize admin media library

sanitize admin users

Add missing await

Co-authored-by: Jean-Sébastien Herbaux <Convly@users.noreply.github.com>

set U&P users fields to searchable:false

add token support to createContentAPIRequest

add searchable:false to getstarted U&P schema

remove comment

sanitize component resolver

remove await

add searchable false to the file's folder path

Fix admin query when the permission query is set to null

add basic tests for filtering private params

add tests for fields

add pagination tests

Fix admin user fields not being sanitized

Fix convert query params for the morph fragment on undefined value

Traverse dynamic zone on nested populate

Handle nested sort, filters & fields in populate queries + handle populate fragment for morphTo relations

Sanitize 'on' subpopulate

Co-authored-by: Jean-Sébastien Herbaux <Convly@users.noreply.github.com>

don't throw error on invalid attributes

check models for snake case column name instead of assuming they are operators

Add first batch of api tests for params sanitize

Fix sort traversal: handle object arrays

Put back removePassword for fields,sort,filters

Add schemas and fixtures for sanitize api tests

Add tests for relations (sanitize api tests)

Move constant to domain scope

Rename sanitize params to sanitize query

Fix typo

Cleanup fixtures file

Fix variable name conflict

Update packages/core/admin/server/services/permission/permissions-manager/sanitize.js

Co-authored-by: Alexandre BODIN <alexandrebodin@users.noreply.github.com>

Update comment for array filters

Rename sanitize test

Test implicit & explicit array operator for filter

Remove unused code
2023-03-15 14:59:19 +01:00
nathan-pichon
0168a2758a
feat(core-utils): add mapAsync and reduceAsync utils 2023-01-17 15:08:14 +01:00
Alexandre Bodin
cf49ddbbfc Prettier and backend fix 2022-08-11 10:20:49 +02:00
Alexandre Bodin
0ae14c06cb 1st fix pass 2022-08-11 10:20:48 +02:00
Ben Irvin
af4349a1a8 return after each relation type is handled 2022-07-22 15:32:25 +02:00
Ben Irvin
266e5a79aa remove comment 2022-07-20 18:27:56 +02:00
Ben Irvin
5b0ec53f09 check populateCreatorFields 2022-07-20 09:18:23 +02:00
Ben Irvin
e1222f7aef fix comment 2022-07-19 17:58:40 +02:00
Ben Irvin
9abeb13fbc allow creator relations 2022-07-19 10:30:55 +02:00
harimkims
5959788352 Refactor sanitizers module to be maintained easily 2022-05-07 17:04:12 +09:00
chisus
0b60be2aca Add sanitizers registry to container
- Remove users-permissions sanitization step in core
- Move sanitization functions to users-permissions plugin utils
- Add sanitizers registry to container for manage sanitizer functions in core so that we can get/add sanitizers anywhere we want
2022-04-21 00:29:35 +09:00
Kim, Harim
e0191544e5
Merge branch 'strapi:master' into fix/populate-user 2022-04-20 21:50:33 +09:00
Alexandre Bodin
6a9db23311 Fix sanitize media 2022-03-08 17:45:31 +01:00
harimkims
4a71a9c93c Add new sanitizer to remove user relation from role entities 2022-03-03 22:45:55 +09:00
Convly
25e62db93a use 'sanitizers' instead of 'utils' 2021-11-10 17:08:54 +01:00
Convly
8d4f8ddd57 Simplify & abstract common sanitize logic 2021-11-08 15:52:42 +01:00
Convly
7c560e3b94 Move the eventHub sanitize logic to the eventHub declaration 2021-11-05 10:36:10 +01:00
Convly
5de071a92e Fix typo 2021-11-04 16:51:40 +01:00
Convly
d6516116b2 Move pipeAsync to @strapi/utils 2021-11-04 16:43:27 +01:00
Jean-Sébastien Herbaux
7f285fb755
[V4] Enhanced sanitize & remove restricted relations from content API's payloads (#11411)
* Rework sanitizeEntity, first iteration

* remove console.log

* Remove useless comments

* Fix e2e tests

* Fix up user e2e test

* Fix remove-restricted-relations visitor

* Handle grapqhql resolver, prevent access to restricted relations

* Handle polymorphic relation in the related visitor

* Remove morph attribute if empty

* Use only the find action to check if the relation is allowed
2021-11-04 15:47:53 +01:00