Homec4science

Make test for setting "next" cookie more general

Authored by epriestley <git@epriestley.com> on Jan 9 2015, 15:42.

Description

Make test for setting "next" cookie more general

Summary:
Ref T6870. Since it does not make sense to redirect the user to the login form after they log in, we try not to set the login form as the next cookie.

However, the current check is hard-coded to /auth/start/, and the form can also be served at /login/. This has no real effect on normal users, but did make debugging T6870 confusing.

Instead of using a hard-coded path check, test if the controller was delegated to. If it was, store the URI. If it's handling the request without delegation, don't.

Test Plan:

  • Visited login form at /login/ and /auth/start/, saw it not set a next URI.
  • Visited login form at /settings/ (while logged out), saw it set a next URI.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley, lpriestley

Maniphest Tasks: T6870

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

Details

Committed
epriestley <git@epriestley.com>Jan 9 2015, 15:42
Pushed
aubortJan 31 2017, 17:16
Parents
rPH420f955c2ad8: Fix an incorrect file name
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHe0aa33c46b0c: Make test for setting "next" cookie more general (authored by epriestley <git@epriestley.com>).Jan 9 2015, 15:42