Consolidate use of magical cookie name strings
Summary: Ref T4339. We have more magical cookie names than we should, move them all to a central location. Test Plan: Registered, logged in, linked account, logged out. See inlines. Reviewers: btrahan Reviewed By: btrahan CC: aran Maniphest Tasks: T4339 Differential Revision: https://secure.phabricator.com/D8041
This commit is contained in:
@@ -13,7 +13,7 @@ final class PhabricatorAuthValidateController
|
||||
|
||||
$failures = array();
|
||||
|
||||
if (!strlen($request->getStr('phusr'))) {
|
||||
if (!strlen($request->getStr('expect'))) {
|
||||
return $this->renderErrors(
|
||||
array(
|
||||
pht(
|
||||
@@ -21,8 +21,8 @@ final class PhabricatorAuthValidateController
|
||||
'phusr')));
|
||||
}
|
||||
|
||||
$expect_phusr = $request->getStr('phusr');
|
||||
$actual_phusr = $request->getCookie('phusr');
|
||||
$expect_phusr = $request->getStr('expect');
|
||||
$actual_phusr = $request->getCookie(PhabricatorCookies::COOKIE_USERNAME);
|
||||
if ($actual_phusr != $expect_phusr) {
|
||||
if ($actual_phusr) {
|
||||
$failures[] = pht(
|
||||
@@ -54,8 +54,8 @@ final class PhabricatorAuthValidateController
|
||||
return $this->renderErrors($failures);
|
||||
}
|
||||
|
||||
$next = $request->getCookie('next_uri');
|
||||
$request->clearCookie('next_uri');
|
||||
$next = $request->getCookie(PhabricatorCookies::COOKIE_NEXTURI);
|
||||
$request->clearCookie(PhabricatorCookies::COOKIE_NEXTURI);
|
||||
|
||||
if (!PhabricatorEnv::isValidLocalWebResource($next)) {
|
||||
$next = '/';
|
||||
|
||||
Reference in New Issue
Block a user