HomePhorge

Avoid sending CSRF token in GET and external forms

Description

Avoid sending CSRF token in GET and external forms

Summary:
Sending CSRF token in GET forms is dangerous because if there are external links
on the target page then the token could leak through Referer header.
The token is not required for anything because GET forms are used only to
display data, not to perform operations.
Sending CSRF tokens to external URLs leaks the token immediately.

Please note that <form action> defaults to GET.

PhabricatorUserOAuthSettingsPanelController suffered from this problem for both
reasons.

Test Plan: Save my settings (POST form).

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D1558

Details

Provenance
vranaAuthored on Feb 2 2012, 6:09 PM
themackabuPushed on Mar 25 2025, 8:07 PM
Parents
rPc0efecb56194: Specify encoding in <meta>
Branches
Unknown
Tags
Unknown

Event Timeline