v3.1.1 - details changelog#350
Conversation
merge stable to unstable
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 65750aa1c9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| for (const recipient of toList) { | ||
| const addrMatch = typeof recipient === 'string' ? recipient.match(/<([^>]+)>/) : null; | ||
| const toAddress = addrMatch ? addrMatch[1] : (typeof recipient === 'string' ? recipient.trim() : recipient); | ||
| const message = new EmailMessage(body.from, toAddress, mimeMessage); | ||
| await env.SEND_EMAIL.send(message); |
There was a problem hiding this comment.
Handle multi-recipient sends without partial failure
This loop sends recipients one-by-one inside a single try, so if an early SEND_EMAIL.send succeeds and a later one throws, the worker returns 500 even though some recipients already received the message. In that scenario the caller treats the whole send as failed and may retry, causing duplicate delivery to recipients that were already sent successfully.
Useful? React with 👍 / 👎.
| if expires_at: | ||
| if not isinstance(expires_at, str) or expires_at <= now_iso: | ||
| return jsonify({"error": "expires_at must be a future ISO-8601 datetime"}), 400 |
There was a problem hiding this comment.
Validate alias expiry as datetime, not string compare
The expiry guard compares expires_at to now_iso lexicographically, which does not enforce a valid ISO-8601 timestamp and can misorder values. Inputs like malformed strings or date-only values can be accepted/rejected incorrectly, then later alias checks (expires_at > now) behave inconsistently, leaving aliases active too long or expiring at unintended times.
Useful? React with 👍 / 👎.
No description provided.