Agent/ayden pr7 - #11
Open
syntaxPriest wants to merge 9 commits into
Open
Conversation
Booking route (app/api/booking/route.ts): - Move Resend API key to process.env.RESEND_API_KEY (was a hardcoded live secret) - Type the body and wrap req.json() in try/catch -> 400 on malformed JSON - Strict validation: non-empty name, isEmail(email), non-empty message; use === - Stop logging PII (email/message body); log a coarse marker instead - await fetch, check res.ok, handle network errors -> 502; escape message HTML - Drop Math.random() id from the response Helpers: - dateStats: fix average() out-of-bounds loop + empty-array guard; fix inverted truncate() logic; guard mostRecent() against empty input - money: total() now treats discountPct as a percentage (÷100) and clamps 0–100 so typical inputs like 20 no longer produce negative totals - slugify: replace all non-alphanumeric runs (not just the first space); fix labelFromPath out-of-bounds index and strip the file extension - validate: real email regex; escapeHtml escapes & < > " ' globally; mailtoLink URL-encodes email and subject Typechecks clean (pre-existing missing-dependency errors in unrelated components are unaffected). No test suite in repo. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ction, slugify dotfiles, whitespace - booking route: send notification to configured owner (BOOKING_TO_EMAIL), not the form submitter; set reply_to so the owner can reply to the submitter - booking route: strip CR/LF from the submitter name before it goes in the Subject header, preventing email header injection - slugify.labelFromPath: keep dotfiles like .gitignore intact instead of returning an empty label - parallaxImage: remove trailing-whitespace blank lines (27, 35) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
✅ Deploy Preview for danieladewale ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
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.
No description provided.