Differential D14026 Diff 33933 src/applications/auth/controller/PhabricatorAuthTerminateSessionController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/auth/controller/PhabricatorAuthTerminateSessionController.php
| Show All 15 Lines | if (!$is_all) { | ||||
| $query->withIDs(array($id)); | $query->withIDs(array($id)); | ||||
| } | } | ||||
| $current_key = PhabricatorHash::digest( | $current_key = PhabricatorHash::digest( | ||||
| $request->getCookie(PhabricatorCookies::COOKIE_SESSION)); | $request->getCookie(PhabricatorCookies::COOKIE_SESSION)); | ||||
| $sessions = $query->execute(); | $sessions = $query->execute(); | ||||
| foreach ($sessions as $key => $session) { | foreach ($sessions as $key => $session) { | ||||
| if ($session->getSessionKey() == $current_key) { | $is_current = phutil_hashes_are_identical( | ||||
| $session->getSessionKey(), | |||||
| $current_key); | |||||
| if ($is_current) { | |||||
| // Don't terminate the current login session. | // Don't terminate the current login session. | ||||
| unset($sessions[$key]); | unset($sessions[$key]); | ||||
| } | } | ||||
| } | } | ||||
| $panel_uri = '/settings/panel/sessions/'; | $panel_uri = '/settings/panel/sessions/'; | ||||
| if (!$sessions) { | if (!$sessions) { | ||||
| ▲ Show 20 Lines • Show All 42 Lines • Show Last 20 Lines | |||||