Skip to content

Conversation

@nick-funk
Copy link
Contributor

What does this PR do?

  • add a guard clause to protect against story url redirect attacks
  • ensure that the incoming story url upsert is within our allowed origins set, otherwise, throw an error and block the request

These changes will impact:

  • commenters
  • moderators
  • admins
  • developers

What changes to the GraphQL/Database Schema does this PR introduce?

None

Does this PR introduce any new environment variables or feature flags?

No

If any indexes were added, were they added to INDEXES.md?

N/A

How do I test this PR?

  • See if Coral works as expected now that we're more rigid on story findOrCreate
    • Test with as many differently shaped allowed origins in your sites config as possible to make sure this won't blow up on SBN, Vox, SaaS clients, etc

Were any tests migrated to React Testing Library?

No

How do we deploy this PR?

  • Merge to develop
  • Merge to develop into main (since this is an important fix)

ensure that the incoming story url upsert is within our allowed
origins set, otherwise, throw an error and block the request
@netlify
Copy link

netlify bot commented Sep 19, 2025

Deploy Preview for gallant-galileo-14878c canceled.

Name Link
🔨 Latest commit c333e74
🔍 Latest deploy log https://app.netlify.com/projects/gallant-galileo-14878c/deploys/68cd850d9b38e80008a5cc47

@tessalt tessalt merged commit 62b8583 into develop Sep 19, 2025
9 checks passed
@tessalt tessalt deleted the fix/findOrCreate-story-url-protection branch September 19, 2025 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants