Version packages#84
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Greptile SummaryThis is a Changesets release PR bumping
Confidence Score: 5/5Safe to merge — the injection guard is correctly implemented for all real attack vectors (CRLF, control chars, non-ASCII in envelope addresses), the docs wiring is consistent with existing patterns, and the convex-email packaging conflict is cleanly resolved. The core security fix (assertSmtpMessage + foldHeader) correctly blocks every practical SMTP injection path. The only finding is that SMTP_HEADER_NAME permits angle brackets in header names despite the changeset claiming otherwise — a documentation/spec discrepancy that does not enable injection and only affects malformed-but-harmless header names. packages/email-sdk/src/smtp.ts — the SMTP_HEADER_NAME regex warrants a second look if the intent is to strictly match the changeset's stated behaviour of rejecting angle brackets in header names. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["smtp().send(message)"] --> B["assertSupportedMessageFields()"]
B --> C["assertSmtpMessage(message)"]
C --> D{"Envelope addresses\npass SMTP_FORBIDDEN_ENVELOPE?"}
D -- "No (contains ctrl/space/<>/non-ASCII)" --> E["throw EmailValidationError"]
D -- "Yes" --> F{"Custom header names\npass SMTP_HEADER_NAME?"}
F -- "No (contains ctrl/space/colon)" --> E
F -- "Yes — note: < and > pass this regex" --> G["SmtpClient.send()"]
G --> H["connect() → EHLO → optional STARTTLS/AUTH"]
H --> I["MAIL FROM / RCPT TO (validated envelope)"]
I --> J["DATA: buildMimeMessage()\nfoldHeader() applied to all values"]
J --> K["QUIT → return result"]
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
A["smtp().send(message)"] --> B["assertSupportedMessageFields()"]
B --> C["assertSmtpMessage(message)"]
C --> D{"Envelope addresses\npass SMTP_FORBIDDEN_ENVELOPE?"}
D -- "No (contains ctrl/space/<>/non-ASCII)" --> E["throw EmailValidationError"]
D -- "Yes" --> F{"Custom header names\npass SMTP_HEADER_NAME?"}
F -- "No (contains ctrl/space/colon)" --> E
F -- "Yes — note: < and > pass this regex" --> G["SmtpClient.send()"]
G --> H["connect() → EHLO → optional STARTTLS/AUTH"]
H --> I["MAIL FROM / RCPT TO (validated envelope)"]
I --> J["DATA: buildMimeMessage()\nfoldHeader() applied to all values"]
J --> K["QUIT → return result"]
Reviews (3): Last reviewed commit: "Prepare 0.6.2 release: archive v0.6.1 do..." | Re-trigger Greptile |
- Snapshot content/docs as the v0.6.1 archive (content/docs-v/0.6.1) and wire docsV061 into source.config.ts, src/lib/source.ts, src/routes/docs/$.tsx, and versions.ts. Once 0.6.2 becomes current, 0.6.1 needs a docs archive or docs:versions:check (run in release:ci before publish) fails the release. - Mark @opencoredev/convex-email private so changeset publish skips it. It has never been published and has no npm Trusted Publisher, so its publish 404s and turns the whole release red. Its redundant publishConfig.access is dropped (the changeset config already sets global access: public); re-enable the package by removing "private" once npm Trusted Publishing is configured. Generated-By: PostHog Code Task-Id: 2fce2016-dc39-453b-ab4d-9edb97bcfc9d
4199dee to
c61eea0
Compare
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
@opencoredev/email-sdk@0.6.2
Patch Changes