Details
- Add a per-message payload-size budget in
MailboxStore.send()/writeInbound()(src/proxy/mailbox/store.js) — reject messages whose serialized size exceeds e.g. 256 KiB, returning a 413 to the caller.
- Reject specifically large
body.assets[*].blob/body.payloadshapes in/asset/submitand/mailbox/sendhandlers insrc/proxy/server/routes.jsbefore callingstore.send().
- (Defense in depth) In
_rebuildIndex(), switchreadLines()to a streaming line reader (readline.createInterfaceoverfs.createReadStream) so a corrupt or oversized file degrades gracefully instead of OOM-ing on startup.