Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F3362641
D25949.1744089853.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
2 KB
Referenced Files
None
Subscribers
None
D25949.1744089853.diff
View Options
diff --git a/src/applications/auth/engine/PhabricatorAuthSessionEngine.php b/src/applications/auth/engine/PhabricatorAuthSessionEngine.php
--- a/src/applications/auth/engine/PhabricatorAuthSessionEngine.php
+++ b/src/applications/auth/engine/PhabricatorAuthSessionEngine.php
@@ -136,11 +136,8 @@
$user_table = new PhabricatorUser();
$conn = $session_table->establishConnection('r');
- // TODO: See T13225. We're moving sessions to a more modern digest
- // algorithm, but still accept older cookies for compatibility.
$session_key = PhabricatorAuthSession::newSessionDigest(
new PhutilOpaqueEnvelope($session_token));
- $weak_key = PhabricatorHash::weakDigest($session_token);
$cache_parts = $this->getUserCacheQueryParts($conn);
list($cache_selects, $cache_joins, $cache_map, $types_map) = $cache_parts;
@@ -155,28 +152,21 @@
s.highSecurityUntil AS s_highSecurityUntil,
s.isPartial AS s_isPartial,
s.signedLegalpadDocuments as s_signedLegalpadDocuments,
- IF(s.sessionKey = %P, 1, 0) as s_weak,
u.*
%Q
FROM %R u JOIN %R s ON u.phid = s.userPHID
- AND s.type = %s AND s.sessionKey IN (%P, %P) %Q',
- new PhutilOpaqueEnvelope($weak_key),
+ AND s.type = %s AND s.sessionKey = %P %Q',
$cache_selects,
$user_table,
$session_table,
$session_type,
new PhutilOpaqueEnvelope($session_key),
- new PhutilOpaqueEnvelope($weak_key),
$cache_joins);
if (!$info) {
return null;
}
- // TODO: Remove this, see T13225.
- $is_weak = (bool)$info['s_weak'];
- unset($info['s_weak']);
-
$session_dict = array(
'userPHID' => $info['phid'],
'sessionKey' => $session_key,
@@ -220,19 +210,6 @@
$this->extendSession($session);
- // TODO: Remove this, see T13225.
- if ($is_weak) {
- $unguarded = AphrontWriteGuard::beginScopedUnguardedWrites();
- $conn_w = $session_table->establishConnection('w');
- queryfx(
- $conn_w,
- 'UPDATE %T SET sessionKey = %P WHERE id = %d',
- $session->getTableName(),
- new PhutilOpaqueEnvelope($session_key),
- $session->getID());
- unset($unguarded);
- }
-
$user->attachSession($session);
return $user;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Apr 8, 05:24 (1 w, 1 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1275535
Default Alt Text
D25949.1744089853.diff (2 KB)
Attached To
Mode
D25949: Complete session digest migration from SHA1 to SHA256
Attached
Detach File
Event Timeline
Log In to Comment