Harden MIME boundaries, topup atomicity, and nonce cleanup#8
Merged
Conversation
- Use crypto.randomUUID() for MIME boundaries instead of predictable Date.now() to prevent boundary injection attacks - Fix topup race condition: use atomic SQL UPDATE with GREATEST() so concurrent topups both correctly extend from the latest expiresAt - Add probabilistic SiwxNonce cleanup (~1% of writes) to prevent unbounded table growth — deletes entries older than 24h Co-Authored-By: Claude Opus 4.6 <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Subdomain owners can buy the matching inbox name with the same wallet. Co-Authored-By: Claude Opus 4.6 <[email protected]>
- Log nonce cleanup errors instead of silently swallowing them - Guard against empty UPDATE result if inbox is deleted between findUnique and atomic update Co-Authored-By: Claude Opus 4.6 <[email protected]>
Agents probing the endpoint now learn that subdomain owners can buy the matching inbox name with the same wallet. Co-Authored-By: Claude Opus 4.6 <[email protected]>
- forwardTo is now optional on buy and nullable on update - When forwardTo is omitted, retainMessages is enabled automatically so the inbox works as a programmatic mailbox via the messages API - Forward handler skips forwarding for inboxes without forwardTo - Cron reminder skips inboxes without a forwarding address - S3 cleanup no longer requires forwarding to have happened - Updated discovery description, llms.txt, and CLAUDE.md Co-Authored-By: Claude Opus 4.6 <[email protected]>
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
Date.now()withcrypto.randomUUID()for MIME boundary generation inses.tsUPDATE ... SET "expiresAt" = GREATEST("expiresAt", NOW()) + intervalso concurrent topups both correctly extendTest plan
pnpm buildpasses🤖 Generated with Claude Code