38 Commits

Author SHA1 Message Date
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
5b0e7f6903
feat(utils): add reduceAsync 2023-02-13 11:38:37 +01:00
nathan-pichon
57009a0f30
fix(file-utils): rewrite requires 2023-02-08 15:57:14 +01:00
Marc-Roig
7b14ee6a35 implement forEachAsync 2023-02-06 15:59:47 +01:00
Marc-Roig
02d467f933 remove mapAsyncDialects 2023-02-06 15:39:47 +01:00
Marc-Roig
708e1d677c refactor mapAsyncDialects import 2023-01-31 14:43:10 +01:00
nathan-pichon
3e532ebd0e
chore(async-utils): remove reduceAsync 2023-01-27 16:10:18 +01:00
nathan-pichon
9b36c3b10a
feat(async-utils): expose functions 2023-01-17 15:10:19 +01:00
nathan-pichon
0168a2758a
feat(core-utils): add mapAsync and reduceAsync utils 2023-01-17 15:08:14 +01:00
Convly
0458e88bce Handle object variables & fix sendTemplatedEmail 2022-12-30 19:46:33 +01:00
Convly
a39fedfb30 Add template in the utils (interpolation helpers) 2022-12-30 18:57:27 +01:00
Pierre Noël
cbcf02eeca Merge branch 'main' into feature/relations-main-view 2022-11-02 10:48:27 +01:00
Tim Izzo
c7cc3d72e3 Move import-default to utils package 2022-10-17 14:51:19 +02:00
Pierre Noël
be7c669bed apply feeback 2022-08-30 15:12:07 +02:00
WalkingPizza
41ec9596ed Automatically convert plugin name to kebab-case 2022-03-28 11:17:49 +02:00
Pierre Noël
fdc60b86ce replace urlJoin by joinBy 2022-03-15 11:51:43 +01:00
Pierre Noël
c0fb7619ef rename toGraphQLName + check enum values don't start with a number 2022-03-03 16:35:41 +01:00
Pierre Noël
e85cfe73f0 allow special characters in an enum 2022-03-03 16:35:41 +01:00
Convly
16ab717fb2 Merge branch 'releases/v4' of github.com:strapi/strapi into v4/new-sanitize-fixes 2021-11-08 15:53:58 +01:00
Pierre Noël
c6a5a047d6 Merge branch 'releases/v4' into v4/error-handling 2021-11-05 10:40:11 +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
Pierre Noël
cb098ec280 clean yup validations 2021-11-04 11:42:45 +01:00
Pierre Noël
b4c9ad0440 refacto graphql errors 2021-11-04 11:42:43 +01:00
Pierre Noël
b58274aecb refactor error handling 2021-11-04 11:41:29 +01:00
Alexandre Bodin
edbad96c2c Remove old query params and remove _where occurences 2021-10-11 21:05:23 +02:00
Convly
10be2a5e65 Merge branch 'releases/v4' into v4/graphql-schema-generation-refactor 2021-09-27 17:19:22 +02:00
Pierre Noël
491a662692 clean some code 2021-09-27 12:28:17 +02:00
Convly
e2be869d3b Merge branch 'releases/v4' into v4/graphql-schema-generation-refactor 2021-09-07 11:22:43 +02:00
Convly
e76e7462b7 Merge branch 'releases/v4' into v4/graphql-schema-generation-refactor 2021-09-01 14:10:10 +02:00
Alexandre Bodin
3784cc5b5e Implement rest api populate syntax and Init refactor convert query params for v4 2021-08-31 19:31:29 +02:00
Pierre Noël
9362311924 add extend fn to controller registry 2021-08-30 11:00:30 +02:00
Convly
40c93fe6c6 Merge branch 'v4/backend' into v4/graphql-schema-generation-refactor 2021-08-23 16:11:57 +02:00
Pierre Noël
09945a46df fixes 2021-08-20 15:23:02 +02:00
Convly
02785294f4 Handle pagination, sort & rework + polymorphic relation update 2021-07-30 11:44:26 +02:00
Alexandre Bodin
3711ca3072 wip 2021-07-02 02:26:14 +02:00
Jean-Sébastien Herbaux
6d9d8ab1ef
Add @strapi/logger (#10340)
* Add @strapi/logger package using winstonjs

* Fix logger require in Strapi.js

* Rework default configuration. Exports custom formats

* Simplify logger middleware
2021-05-20 08:55:18 +02:00
Alexandre Bodin
a14504e699 Init scoped packages 2021-04-29 12:03:54 +02:00