Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15413905
D17687.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D17687.id.diff
View Options
diff --git a/src/applications/auth/editor/PhabricatorAuthSSHKeyEditor.php b/src/applications/auth/editor/PhabricatorAuthSSHKeyEditor.php
--- a/src/applications/auth/editor/PhabricatorAuthSSHKeyEditor.php
+++ b/src/applications/auth/editor/PhabricatorAuthSSHKeyEditor.php
@@ -197,9 +197,7 @@
// After making any change to an SSH key, drop the authfile cache so it
// is regenerated the next time anyone authenticates.
- $cache = PhabricatorCaches::getMutableCache();
- $authfile_key = PhabricatorAuthSSHKeyQuery::AUTHFILE_CACHEKEY;
- $cache->deleteKey($authfile_key);
+ PhabricatorAuthSSHKeyQuery::deleteSSHKeyCache();
return $xactions;
}
diff --git a/src/applications/auth/query/PhabricatorAuthSSHKeyQuery.php b/src/applications/auth/query/PhabricatorAuthSSHKeyQuery.php
--- a/src/applications/auth/query/PhabricatorAuthSSHKeyQuery.php
+++ b/src/applications/auth/query/PhabricatorAuthSSHKeyQuery.php
@@ -11,6 +11,12 @@
private $keys;
private $isActive;
+ public static function deleteSSHKeyCache() {
+ $cache = PhabricatorCaches::getMutableCache();
+ $authfile_key = self::AUTHFILE_CACHEKEY;
+ $cache->deleteKey($authfile_key);
+ }
+
public function withIDs(array $ids) {
$this->ids = $ids;
return $this;
diff --git a/src/applications/people/editor/PhabricatorUserEditor.php b/src/applications/people/editor/PhabricatorUserEditor.php
--- a/src/applications/people/editor/PhabricatorUserEditor.php
+++ b/src/applications/people/editor/PhabricatorUserEditor.php
@@ -195,6 +195,10 @@
$user->saveTransaction();
+ // The SSH key cache currently includes usernames, so dirty it. See T12554
+ // for discussion.
+ PhabricatorAuthSSHKeyQuery::deleteSSHKeyCache();
+
$user->sendUsernameChangeEmail($actor, $old_username);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Mar 20, 9:56 PM (5 h, 44 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7396746
Default Alt Text
D17687.id.diff (1 KB)
Attached To
Mode
D17687: Dirty the SSH key cache when usernames change
Attached
Detach File
Event Timeline
Log In to Comment