mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-19 05:12:41 +01:00
Make detection/recovery for bad cookies more strict
Summary: When a user has bad cookies, try to clear everything and tell them they might need to manually clear things. Test Plan: Added "&& false" to the valid branch and got the exception message. Reviewers: jungejason Reviewed By: jungejason CC: aran, jungejason Differential Revision: 839
This commit is contained in:
parent
67de714a2f
commit
411e16771a
1 changed files with 4 additions and 0 deletions
|
@ -52,7 +52,11 @@ abstract class PhabricatorController extends AphrontController {
|
||||||
$user->loadFromArray($info);
|
$user->loadFromArray($info);
|
||||||
} else {
|
} else {
|
||||||
// The session cookie is invalid, so clear it.
|
// The session cookie is invalid, so clear it.
|
||||||
|
$request->clearCookie('phusr');
|
||||||
$request->clearCookie('phsid');
|
$request->clearCookie('phsid');
|
||||||
|
throw new Exception(
|
||||||
|
"Your login session is invalid. Try logging in again. If that ".
|
||||||
|
"doesn't work, clear your browser cookies.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue