Changeset View
Changeset View
Standalone View
Standalone View
src/applications/auth/engine/PhabricatorAuthSessionEngine.php
Context not available. | |||||
* @return const Session kind constant. | * @return const Session kind constant. | ||||
*/ | */ | ||||
public static function getSessionKindFromToken($session_token) { | public static function getSessionKindFromToken($session_token) { | ||||
if (strpos($session_token, '/') === false) { | if (@strpos($session_token, '/') === false) { | ||||
// Old-style session, these are all user sessions. | // Old-style session, these are all user sessions. | ||||
return self::KIND_USER; | return self::KIND_USER; | ||||
} | } | ||||
list($kind, $key) = explode('/', $session_token, 2); | list($kind, $key) = @explode('/', $session_token, 2); | ||||
switch ($kind) { | switch ($kind) { | ||||
case self::KIND_ANONYMOUS: | case self::KIND_ANONYMOUS: | ||||
Context not available. | |||||
foreach ($info as $key => $value) { | foreach ($info as $key => $value) { | ||||
if (strncmp($key, 's_', 2) === 0) { | if (strncmp($key, 's_', 2) === 0) { | ||||
unset($info[$key]); | unset($info[$key]); | ||||
$session_dict[substr($key, 2)] = $value; | $session_dict[@substr($key, 2)] = $value; | ||||
continue; | continue; | ||||
} | } | ||||
Context not available. |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0