17 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
Alexandre Bodin
cf49ddbbfc Prettier and backend fix 2022-08-11 10:20:49 +02:00
Alexandre Bodin
37bacdb691 Start fixing tests 2021-09-07 21:03:30 +02:00
Alexandre Bodin
c122056f2c Fix search test and entity manager count query 2021-08-11 11:12:58 +02:00
Kim, Harim
ac3d10006c
Add session option to Strapi query for Mongo Multi-Document transaction (#6447)
* add session option to mongo queries for transaction

Signed-off-by: harimkims <harimkims@gmail.com>

* seperate session parameter in buildQuery functions

Signed-off-by: harimkims <harimkims@gmail.com>

* clarify comment about mongoose create requirement

Signed-off-by: harimkims <harimkims@gmail.com>

Co-authored-by: Convly <jean-sebastien.herbaux@epitech.eu>
2021-01-13 10:37:23 +01:00
Convly
5bf9375381 First impl (wip)
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
2021-01-08 09:52:21 +01:00
Alexandre Bodin
07e7cfc0bd Make lint stricter and fix the errors
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-11-02 19:41:42 +01:00
Andrey Hohutkin
94e031eba5
Fixes for Media Library upload (#5971)
* Fix formatFileInfo

Keep original file name including extension

* Fix file name for generated media

File name was not set for all generated media: thumbnail and resized pictures.

* Generate hash based on file name without extension

* cleanup PR

Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>

* Fix unit tests
Exclude temporarily unit test 'Replaces reserved and unsafe characters for URLs and files in hash' because it did not work properly ever.

* Remove path delimiter from filename because it is correct character for file path

* Fix e2e

* Continue fixes for e2e

* Fix createRequest content type

* Correct thumbnail name in e2e test

Co-authored-by: Alexandre BODIN <alexandrebodin@users.noreply.github.com>
Co-authored-by: Alexandre Bodin <bodin.alex@gmail.com>
Co-authored-by: Andrey Hohutkin <none@none>
2020-06-25 10:13:42 +02:00
Alexandre Bodin
c5e50665cd Add upload route in content-manager and remove formdata for data creation 2019-07-30 16:58:36 +02:00
Alexandre Bodin
7dab357125 Cleanup and test Groups CRUD 2019-07-02 13:28:18 +02:00
Alexandre Bodin
a2bfb52344 Refactor testing, add simple crud tests 2019-05-13 14:00:12 +02:00
Alexandre Bodin
a0b45e2741 Add cypress run 2019-03-13 00:10:20 +01:00
Alexandre Bodin
96b023d16b Restructure tests 2019-03-13 00:10:19 +01:00
Alexandre Bodin
f4b5a487d1 Add forceExit param to jest runner 2019-03-13 00:10:19 +01:00
Alexandre Bodin
865ee5e5e2 Init test automation
wip
2019-03-13 00:10:19 +01:00
Aurelsicoko
208319b8a2 Update request helper 2018-06-13 16:16:46 +02:00
Aurelsicoko
7e5b859575 Split tests in packages 2018-06-13 15:31:33 +02:00