Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove 'confirm_action' from list of actions requiring the CSRF token #529

Closed

Conversation

mpkut
Copy link
Contributor

@mpkut mpkut commented Jan 15, 2019

The current CSRF code is configured to require the token for the confirm_action action. However #527 shows that there are legitimate Sympa functions such as unauthenticated archive views that invoke confirm_action as part of a GET request (i.e. the "I am not a spammer" click-through challenge for archives).

This simple patch removes confirm_action from the %require_csrftoken list. That allows confirm_action to be invoked during GET requests, allowing unauthenticated archive views and other GET based confirmed actions to work as expected.

Thankfully, the input validation in Sympa::WWW::Session::confirm_action() acts against CSRF on its own, so we are still covered there. The confirm submission must be the very next click in the user's Sympa session, otherwise the pending action is cancelled. Furthermore the action arguments must match a recorded hash before the action can proceed.

ikedas added a commit that referenced this pull request Jan 16, 2019
Remove 'confirm_action' from list of actions requiring the CSRF token
@ikedas
Copy link
Member

ikedas commented Jan 16, 2019

@mpkut, thanks for follow up.

Merged to a tentative branch sympa-6.2.40 for the next patch release.

@ikedas ikedas closed this Jan 16, 2019
@mpkut mpkut deleted the fix_csrf_confirm_action branch January 16, 2019 19:31
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.

2 participants