Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/238637
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(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralAuth refs/changes/37/238637/1 diff --git a/includes/CentralAuthHooks.php b/includes/CentralAuthHooks.php index 18d256b..06ed3ff 100644 --- a/includes/CentralAuthHooks.php +++ b/includes/CentralAuthHooks.php @@ -1755,7 +1755,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/238637 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2bd876bc2084ae73b38fad2fc63e5d1f60615a83 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CentralAuth Gerrit-Branch: wmf/1.26wmf22 Gerrit-Owner: Legoktm <legoktm.wikipe...@gmail.com> Gerrit-Reviewer: Aaron Schulz <asch...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits