mirror of
https://github.com/nomadkaraoke/karaoke-gen.git
synced 2026-12-04 17:16:04 +09:00
fix: allowlisted domains bypassed by external disposable email APIs (#625)
## Summary - The disposable email detection had a bug where the Firestore `allowlisted_domains` only protected against the Tier 1 static blocklist check. External API checks (DeBounce, verifymail.io) at Tiers 3-4 ran regardless and could override admin allowlist decisions. - This broke the E2E happy path test starting March 21 when `inbox.testmail.app` got flagged by DeBounce as disposable — the signup step failed because "Check Your Email" never appeared. - Adds a "Tier 1.5" check so allowlisted domains skip external API calls entirely, plus a CI setup step to ensure the domain stays allowlisted. ## Changes - `backend/services/email_validation_service.py`: Add allowlist check before external API calls; include `allowlisted_domains` in cached config - `backend/tests/test_email_validation_service.py`: Regression test for allowlisted domain bypass - `.github/workflows/e2e-happy-path.yml`: CI setup step to ensure `inbox.testmail.app` is allowlisted before test runs ## Test plan - [x] All 53 email validation tests pass (52 existing + 1 new regression test) - [x] `inbox.testmail.app` added to production Firestore allowlist - [ ] E2E happy path test passes after deployment <!-- @coderabbitai ignore --> 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
78e4cc7010
commit
cd3076fc58
4 files changed
+55
-1
No files matched your search
@@ -67,6 +67,16 @@ jobs:
|
||||
working-directory: frontend
|
||||
run: mkdir -p test-results
|
||||
|
||||
- name: Ensure testmail.app domain is allowlisted
|
||||
run: |
|
||||
# testmail.app is used for E2E testing but gets flagged as disposable
|
||||
# by external APIs. Ensure it's in the allowlist before the test runs.
|
||||
curl -sf -X POST \
|
||||
"https://api.nomadkaraoke.com/api/admin/rate-limits/blocklists/allowlisted-domains" \
|
||||
-H "X-Admin-Token: ${{ secrets.E2E_ADMIN_TOKEN }}" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"domain": "inbox.testmail.app"}' || echo "Warning: failed to allowlist domain (may already exist)"
|
||||
|
||||
- name: Refresh E2E session token (when use_test_token enabled)
|
||||
id: refresh_token
|
||||
if: inputs.use_test_token == true
|
||||
|
||||
Reference in new issue
Block a user