Repository navigation
fix: harden email pipeline and align setup docs with behavior #11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
a8e6235
refactor: extract shared prefix validation into src/utils/prefix.ts
040c0e0
fix: treat empty stored code as missing so GET /code returns 404
e0db199
fix: harden Workers AI fallback extraction
4a52348
fix: release raw stream reader lock in parser finally block
4d74543
docs: align setup skill and wrangler.toml with actual behavior
6147e66
fix: cancel the Workers AI request when the timeout fires
af34376
fix: keep AUTH_TOKEN out of [vars] and document it as a Wrangler secret
fcf8662
docs: use npx for the wrangler secret command in setup docs
b310527
fix: sync REQUIRE auth guides with the fail-closed middleware
d40b679
docs: mark AUTH_TOKEN as not set by default in setup skill
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| /** | ||
| * Validates an email prefix (the part before @domain). | ||
| * Must start with alphanumeric, may contain dots/underscores/hyphens. | ||
| * Rejects '.', '..', and empty strings. | ||
| */ | ||
| export function validatePrefix(prefix: string): boolean { | ||
| if (!prefix || prefix === '.' || prefix === '..') return false; | ||
| return /^[a-z0-9][a-z0-9._-]*$/.test(prefix); | ||
| } | ||
|
|
||
| /** | ||
| * Sanitizes a prefix for safe use as a KV key component. | ||
| * Strips invalid characters and limits length. | ||
| */ | ||
| export function sanitizePrefix(prefix: string): string { | ||
| return prefix.replace(/[^a-z0-9._-]/g, '').slice(0, 100); | ||
| } |
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.