Skip to content

fix(webhooks): reject future-dated timestamps in verifyWebhookWithReplay (#404) - #562

Merged
David-patrick-chuks-02 merged 3 commits into
Lilly-Protocol:mainfrom
Zhiyilang074811:fix/issue-404-webhook-timestamp
Sep 6, 2026
Merged

fix(webhooks): reject future-dated timestamps in verifyWebhookWithReplay (#404)#562
David-patrick-chuks-02 merged 3 commits into
Lilly-Protocol:mainfrom
Zhiyilang074811:fix/issue-404-webhook-timestamp

Conversation

@Zhiyilang074811

Copy link
Copy Markdown
Contributor

Closes #404. Adds lower bound check to reject timestamps > toleranceMs in the future. Validates toleranceMs is positive and finite. Adds boundary tests.

Zhiyilang074811 and others added 2 commits September 5, 2026 20:29
…col#487 Lilly-Protocol#485 — client ID validation, non-2xx JSON errors, shared defaults, baseUrl fallback

- agent/wallet/payment clients: reject empty/whitespace IDs via validateNonEmptyString (Closes Lilly-Protocol#443, bounty Lilly-Protocol#489 )
- fetch-http-client: read body once as text then JSON.parse; throw LilyApiError (not ValidationError) on non-2xx JSON parse failures (Closes Lilly-Protocol#445, bounty Lilly-Protocol#488 )
- src/config/defaults.ts: new file with DEFAULT_TIMEOUT_MS, DEFAULT_RETRY_POLICY, DEFAULT_RETRYABLE_STATUS_CODES (bounty Lilly-Protocol#487 )
- resolve-config.ts: import from defaults; support LILY_BASE_URL env fallback alongside LILY_API_URL (Closes Lilly-Protocol#444, bounty Lilly-Protocol#485 )
- config.ts: export shared defaults
- Add tests: client-id-validation, shared-defaults, updated fetch-non-json tests
@David-patrick-chuks-02
David-patrick-chuks-02 merged commit 313cf66 into Lilly-Protocol:main Sep 6, 2026
3 of 8 checks passed
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 this pull request may close these issues.

[Bounty: $70] Reject future-dated and over-skewed timestamps in verifyWebhookWithReplay

3 participants