From: Aaron Schulz Date: Thu, 26 May 2016 19:04:22 +0000 (-0700) Subject: Bail out in ApiStashEdit for bots for sanity X-Git-Tag: 1.31.0-rc.0~6809^2 X-Git-Url: http://git.cyclocoop.org/fichier?a=commitdiff_plain;h=d690083213140f19184d9c98de9c536d867abcc8;p=lhc%2Fweb%2Fwiklou.git Bail out in ApiStashEdit for bots for sanity checkCache() is disabled in this case anyway. Change-Id: I1c18585eecc1a7c4c0e24546799c7ee448b3ea57 --- diff --git a/includes/api/ApiStashEdit.php b/includes/api/ApiStashEdit.php index ce254c96fb..40aa4d4b37 100644 --- a/includes/api/ApiStashEdit.php +++ b/includes/api/ApiStashEdit.php @@ -46,6 +46,10 @@ class ApiStashEdit extends ApiBase { $user = $this->getUser(); $params = $this->extractRequestParams(); + if ( $user->isBot() ) { // sanity + $this->dieUsage( 'This interface is not supported for bots', 'botsnotsupported' ); + } + $page = $this->getTitleOrPageId( $params ); $title = $page->getTitle();