Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(API): validate excecutions and workflow filter parameters #4424

Merged
merged 8 commits into from
Oct 26, 2022

Conversation

flipswitchingmonkey
Copy link
Contributor

  • use json schema to validate and typecast filter parameters in executions and workflows REST endpoints
  • add early return paths

@linear
Copy link

linear bot commented Oct 24, 2022

N8N-5134

@n8n-assistant n8n-assistant bot added core Enhancement outside /nodes-base and /editor-ui n8n team Authored by the n8n team labels Oct 24, 2022
@flipswitchingmonkey
Copy link
Contributor Author

probably now needs to be adjusted to use jsonParse()

packages/cli/src/api/executions.api.ts Outdated Show resolved Hide resolved
packages/cli/src/api/executions.api.ts Show resolved Hide resolved
packages/cli/src/workflows/workflows.controller.ts Outdated Show resolved Hide resolved
krynble
krynble previously approved these changes Oct 25, 2022
Copy link
Contributor

@krynble krynble left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!
I've left a small suggested change, feel free to disregard and merge.

packages/cli/src/api/executions.api.ts Outdated Show resolved Hide resolved
@flipswitchingmonkey flipswitchingmonkey merged commit dd3c596 into master Oct 26, 2022
@flipswitchingmonkey flipswitchingmonkey deleted the n8n-5134-rest-query-limiting branch October 26, 2022 11:30
@n8n-assistant n8n-assistant bot added the Upcoming Release Will be part of the upcoming release label Oct 26, 2022
@janober
Copy link
Member

janober commented Oct 27, 2022

Got released with n8n@0.200.0

@janober janober removed the Upcoming Release Will be part of the upcoming release label Oct 27, 2022
valya pushed a commit to valya/n8n that referenced this pull request Nov 8, 2022
…#4424)

* typeorm queries with AND for filter, schema validation
* validate filters
* replace json.parse with jsonParse()
* limited fields further
* limited workflow fields further
* removes date filter fields and fix waitTill filter
* simplified filter name arrays
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Enhancement outside /nodes-base and /editor-ui n8n team Authored by the n8n team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants