fix(synology-chat): enforce bounded webhook body reads#25831
Merged
steipete merged 5 commits intoopenclaw:mainfrom Mar 2, 2026
Merged
fix(synology-chat): enforce bounded webhook body reads#25831steipete merged 5 commits intoopenclaw:mainfrom
steipete merged 5 commits intoopenclaw:mainfrom
Conversation
00a5d8b to
181668c
Compare
Contributor
|
Landed via temp rebase onto main.
Thanks @bmendonca3! |
This was referenced Mar 2, 2026
Closed
execute008
pushed a commit
to execute008/openclaw
that referenced
this pull request
Mar 2, 2026
dawi369
pushed a commit
to dawi369/davis
that referenced
this pull request
Mar 3, 2026
OWALabuy
pushed a commit
to kcinzgg/openclaw
that referenced
this pull request
Mar 4, 2026
zooqueen
pushed a commit
to hanzoai/bot
that referenced
this pull request
Mar 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
readRequestBodyWithLimit) so request size and read time are both enforced before parsing.Change Type
Scope
extensions/synology-chat/src/webhook-handler.tsextensions/synology-chat/src/webhook-handler.test.tsSecurity Impact
endbefore token checks, consuming gateway connection/resources.Repro + Verification
Automated verification:
pnpm exec vitest run extensions/synology-chat/src/webhook-handler.test.ts --maxWorkers=1Evidence
returns 408 when request body times out.Human Verification
Compatibility / Migration
Failure Recovery
Risks and Mitigations
Greptile Summary
Replaced ad-hoc body reader in Synology Chat webhook handler with the shared bounded reader (
readRequestBodyWithLimit) to enforce both request size (1MB) and read time (30s) limits. This mitigates slowloris-style DoS attacks where unauthenticated clients could open many POST requests with trickled/incomplete bodies, consuming gateway resources before token validation occurs.readRequestBodyWithLimitwhich enforces 1MB size limit and 30s timeoutreturns 408 when request body times outto verify stalled bodies are rejected with timeout semanticsConfidence Score: 5/5
readRequestBodyWithLimit) that is already used consistently across the codebase (LINE, Voice Call, NextCloud Talk, BlueBubbles extensions). The security improvement is clear: the old implementation only enforced size limits but had no timeout protection, allowing slowloris-style attacks. The new implementation enforces both size and time bounds before token validation. The regression test properly validates timeout behavior using fake timers. Error handling is structured and returns appropriate HTTP status codes.Last reviewed commit: f31f1dd