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

GraphQL Protection: Limit number of Mutations in a Query #689

Closed
predic8 opened this issue Aug 8, 2023 · 2 comments · Fixed by #753
Closed

GraphQL Protection: Limit number of Mutations in a Query #689

predic8 opened this issue Aug 8, 2023 · 2 comments · Fixed by #753
Assignees
Milestone

Comments

@predic8
Copy link
Member

predic8 commented Aug 8, 2023

Protect against Brute Force GraphQL Style:

'''
[
{“query”: "mutation {securityAnser(year: "17/05/73", new: "joshua123")}}
{“query”: "mutation {securityAnser(year: "18/05/73", new: "joshua123")}}
{“query”: "mutation {securityAnser(year: "19/05/73", new: "joshua123")}}
{“query”: "mutation {securityAnser(year: "20/05/73", new: "joshua123")}}
{“query”: "mutation {securityAnser(year: "21/05/73", new: "joshua123")}}
...
]
'''

@predic8 predic8 added this to the 5.3 milestone Aug 8, 2023
@t-burch
Copy link
Collaborator

t-burch commented Oct 2, 2023

Not actually possible if following the specification
Only one query can be in the HTTP request, whilst one query can have multiple operations, they need to be named and only one named operation can be executed at a time.

@t-burch t-burch closed this as completed Oct 2, 2023
@predic8
Copy link
Member Author

predic8 commented Oct 2, 2023

Even if it is againt the spec. We can count the number of mutation and send back an error if there are more than X mutations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants