Homec4science

Detect developer error when constructing forms with absolute URIs

Authored by epriestley <git@epriestley.com> on Jan 23 2014, 23:03.

Description

Detect developer error when constructing forms with absolute URIs

Summary: Ref T1921. Ref T4339. If you phabricator_form() with an absolute URI, we silently drop the CSRF tokens. This can be confusing if you meant to specify "/some/path" but ended up specifying "http://this.install.com/some/path". In all current cases that I can think of / am aware of, this indicates an error in the code. Make it more obvious what's happening and how to fix it. The error only fires in developer mode.

Test Plan: Hit this case, also rendered normal forms.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T4339, T1921

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

Details

Committed
epriestley <git@epriestley.com>Jan 23 2014, 23:03
Pushed
aubortJan 31 2017, 17:16
Parents
rPH69ddb0ced631: Issue "anonymous" sessions for logged-out users
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHa2515921b635: Detect developer error when constructing forms with absolute URIs (authored by epriestley <git@epriestley.com>).Jan 23 2014, 23:03