Replies: 1 comment 2 replies
-
The migration guide does allude to this:
It's a non-standard transport protocol, and it can actually decrease performance by making every operation in a batch wait until the slowest one is done. At the time of AS4, we felt it was reasonable to only enable the standard GraphQL-over-HTTP protocol by default, leaving future possibilities open for solving the problems solved by batching (eg single |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I was working on something and found batching to be really useful for my use case but then realised that it is disabled by default. Enabling it very easy but I'm trying to understand the reason for disabling it by default in v4.
I found an issue #5686 that talks about how if batching is allowed then an attacker can send a large number of graphql operations in a single http request to validate OTPs and get around the rate limit. And then there is a pr #5778 that introduced the option to disable it if we don't want this feature. And then it was disabled by default in 25fbc7a (packages/server/src/ApolloServer.ts L262) with no explanation.
Let's talk about this issue #5686. I don't understand how disabling batching would help. Couldn't the attacker send a query like this and bypass the limit anyway?
The number of attempts to validate OTP should be properly tracked in a database. That sort of thing should not be handled at the graphql layer.
That being said I'm trying to understand the risks of enabling it and I don't really see any. Can someone please let me know the risks of enabling it?
Beta Was this translation helpful? Give feedback.
All reactions