Commit Graph

10 Commits

Author SHA1 Message Date
Lawrence Hook b433727754 Add email validation, IP rate limiting, and fix SES parsing bug
Add SES email validation with 2s timeout and fail-open behavior to
send-magic-link. Add per-IP rate limiting with decrement on verify.
Fix SES response parsing path (MailboxValidation.IsValid.ConfidenceVerdict).
Add dedicated unit tests for validateEmail.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 23:48:01 -05:00
Lawrence Hook 84b103e46b Migrate storage layer from flat files to SQLite
Replace file-per-record auth requests, file-per-hash rate limits, and
JSON blob subscription cache with a single SQLite database via
better-sqlite3. Consolidate duplicated email/IP rate limit code into
shared helpers. Add missing IP rate limit pruning to cleanup interval.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 23:47:51 -05:00
Lawrence Hook e2732dee6f Fix fast-xml-parser vulnerability via npm override and update @aws-sdk/client-ses
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 16:50:33 -05:00
Lawrence Hook 56b119ed98 Cache grandfathered emails in memory at startup
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 05:01:00 -05:00
Lawrence Hook afed16a38a Add tests for cache TTL and webhook ordering race condition
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 04:47:51 -05:00
Lawrence Hook 361a8caf84 Harden license cache: 10s TTL and skip incomplete subscription.created
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 04:34:00 -05:00
dependabot[bot] c473314ca5 Bump fast-xml-parser and @aws-sdk/xml-builder in /server (#201)
Bumps [fast-xml-parser](https://github.com/NaturalIntelligence/fast-xml-parser) and [@aws-sdk/xml-builder](https://github.com/aws/aws-sdk-js-v3/tree/HEAD/packages-internal/xml-builder). These dependencies needed to be updated together.

Updates `fast-xml-parser` from 5.3.4 to 5.3.6
- [Release notes](https://github.com/NaturalIntelligence/fast-xml-parser/releases)
- [Changelog](https://github.com/NaturalIntelligence/fast-xml-parser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/NaturalIntelligence/fast-xml-parser/compare/v5.3.4...v5.3.6)

Updates `@aws-sdk/xml-builder` from 3.972.4 to 3.972.5
- [Release notes](https://github.com/aws/aws-sdk-js-v3/releases)
- [Changelog](https://github.com/aws/aws-sdk-js-v3/blob/main/packages-internal/xml-builder/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-js-v3/commits/HEAD/packages-internal/xml-builder)

---
updated-dependencies:
- dependency-name: fast-xml-parser
  dependency-version: 5.3.6
  dependency-type: indirect
- dependency-name: "@aws-sdk/xml-builder"
  dependency-version: 3.972.5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-21 18:22:39 -05:00
Lawrence Hook 49e1a5d9ba Fix license cache not updating after checkout
The checkout.session.completed webhook only sent a welcome email but
did not update the subscription cache, so users kept getting cached
free status after paying.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 17:30:29 -05:00
Lawrence Hook 3f4b42b2de Update qs to 6.14.2 to fix low-severity DoS vulnerability
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 18:49:28 -05:00
Lawrence Hook 8825666512 Merge the monetization feature branch.
Add RYS Premium subscription system

Introduce optional paid tier with sign-in, Stripe billing, and premium
feature gating. Core features remain free. Includes Node.js server for
auth, payments, and license management.

Extension changes:
- Sign-in flow with magic link email
- Premium/upgrade/account modals with branded UI
- Premium feature gating (60+ advanced settings)
- Password lock and scheduling (premium)
- Fix "hide all but first row" for YouTube's new flat homepage DOM
- Hide sidebar ad panels by default
- Enable "Hide all Shorts" by default

Server:
- Magic link auth with rate limiting
- Stripe checkout, webhooks, and billing portal
- JWT-based license tokens
- AWS SES transactional emails (welcome, sign-in, cancellation)
- Grandfathered donor support

Also adds CI workflow, server test suite, and extension unit tests.
2026-02-15 18:45:37 -05:00