Skip CSRF protection for token-keyed invitation RSVP actions - #2838
Merged
Conversation
mroderick
force-pushed
the
fix/skip-forgery-on-token-rsvp-actions
branch
from
September 2, 2026 12:16
1bafa8a to
20e34fd
Compare
mroderick
marked this pull request as ready for review
September 2, 2026 12:27
olleolleolle
approved these changes
Sep 2, 2026
olleolleolle
left a comment
Collaborator
There was a problem hiding this comment.
Perhaps some of the test preconditions could become a nested context.
Event and workshop invitation RSVP actions are authenticated solely by the unguessable invitation token in the URL, so CSRF is redundant there. It also fails outright when browsers withhold the session cookie (e.g. WebKit ITP classifying the navigation from a mail client as cross-site), which surfaces as ActionController::InvalidAuthenticityToken in Rollbar #535 -- the same failure PR #2641 fixed for the feedback form. Skip forgery protection for InvitationsController#attend/#reject, WorkshopInvitationController#update/#accept, and both WaitingListsController actions, and add regression specs that post without a CSRF token.
mroderick
force-pushed
the
fix/skip-forgery-on-token-rsvp-actions
branch
from
September 2, 2026 14:02
20e34fd to
e79e4e8
Compare
Collaborator
Author
|
Applied: the CSRF-protection toggle now lives in a shared context ( |
mroderick
enabled auto-merge
September 2, 2026 21:31
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.
Members who open invitation links from mail apps cannot RSVP: their browser withholds the session cookie, so CSRF verification fails with
ActionController::InvalidAuthenticityToken(Rollbar 535). The invitation token in the URL already authenticates these actions, so this change removes the redundant CSRF check from them.Key changes:
skip_forgery_protectionfor the six token-keyed RSVP actions:InvitationsController#attend/#reject,WorkshopInvitationController#update/#accept, andWaitingListsController#create/#destroy(scopedonly:).SecureRandomtoken carried in the URL. The request carries no session authority, which is the only thing CSRF protects — an attacker who cannot guess the token cannot forge the request. PR fix: skip CSRF protection for feedback form submission #2641 applied the same reasoning to the feedback form.Background and scope
Web browsers withhold cookies when they classify a navigation as cross-site. WebKit's Intelligent Tracking Prevention does this for every iOS browser, including Chrome, so members arriving from Mail, Gmail, or Slack reach the invitation page with an ephemeral session. The RSVP POST then arrives without a matching session and fails CSRF verification.
The failure first surfaced on the feedback form and was fixed for that form alone in PR #2641. An audit of all mutating routes found six more token-keyed actions with the same structure; everything else (self check-in, account settings, admin, OAuth) is session-gated and keeps CSRF protection.
Related, not addressed here: the workshop invitation "reject" link mutates via a GET request, which email prefetchers can trigger. That needs its own change.