jenkins-bot has submitted this change and it was merged. Change subject: Use set() for tokens with unique keys ......................................................................
Use set() for tokens with unique keys Change-Id: I2bd876bc2084ae73b38fad2fc63e5d1f60615a83 (cherry picked from commit 933e90368390566cfa4f007a3ffdac56893171cb) --- M includes/CentralAuthHooks.php M includes/api/ApiCentralAuthToken.php 2 files changed, 2 insertions(+), 2 deletions(-) Approvals: Aaron Schulz: Looks good to me, but someone else must approve Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/CentralAuthHooks.php b/includes/CentralAuthHooks.php index 830f906..9f9f383 100644 --- a/includes/CentralAuthHooks.php +++ b/includes/CentralAuthHooks.php @@ -1772,7 +1772,7 @@ ); $key = CentralAuthUser::memcKey( 'api-token', $loginToken ); - CentralAuthUser::getSessionCache()->add( $key, $data, 60 ); + CentralAuthUser::getSessionCache()->set( $key, $data, 60 ); return $loginToken; } diff --git a/includes/api/ApiCentralAuthToken.php b/includes/api/ApiCentralAuthToken.php index 2b1bd3b..99d5605 100644 --- a/includes/api/ApiCentralAuthToken.php +++ b/includes/api/ApiCentralAuthToken.php @@ -62,7 +62,7 @@ $loginToken = MWCryptRand::generateHex( 32 ) . dechex( $centralUser->getId() ); $key = CentralAuthUser::memcKey( 'api-token', $loginToken ); - CentralAuthUser::getSessionCache()->add( $key, $data, 60 ); + CentralAuthUser::getSessionCache()->set( $key, $data, 60 ); $this->getResult()->addValue( null, $this->getModuleName(), array( 'centralauthtoken' => $loginToken -- To view, visit https://gerrit.wikimedia.org/r/238638 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2bd876bc2084ae73b38fad2fc63e5d1f60615a83 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CentralAuth Gerrit-Branch: wmf/1.26wmf23 Gerrit-Owner: Legoktm <legoktm.wikipe...@gmail.com> Gerrit-Reviewer: Aaron Schulz <asch...@wikimedia.org> Gerrit-Reviewer: Legoktm <legoktm.wikipe...@gmail.com> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits