Changeset View
Changeset View
Standalone View
Standalone View
src/applications/base/controller/PhabricatorController.php
Show First 20 Lines • Show All 92 Lines • ▼ Show 20 Lines | if ($request->getUser()) { | ||||
// the cookie. | // the cookie. | ||||
if ($request->canSetCookies()) { | if ($request->canSetCookies()) { | ||||
$request->setCookie(PhabricatorCookies::COOKIE_SESSION, $phsid); | $request->setCookie(PhabricatorCookies::COOKIE_SESSION, $phsid); | ||||
} | } | ||||
} | } | ||||
if (!$user->isLoggedIn()) { | if (!$user->isLoggedIn()) { | ||||
$user->attachAlternateCSRFString(PhabricatorHash::weakDigest($phsid)); | $csrf = PhabricatorHash::digestWithNamedKey($phsid, 'csrf.alternate'); | ||||
$user->attachAlternateCSRFString($csrf); | |||||
} | } | ||||
$request->setUser($user); | $request->setUser($user); | ||||
} | } | ||||
id(new PhabricatorAuthSessionEngine()) | id(new PhabricatorAuthSessionEngine()) | ||||
->willServeRequestForUser($user); | ->willServeRequestForUser($user); | ||||
▲ Show 20 Lines • Show All 525 Lines • Show Last 20 Lines |