Merge "Bail out in ApiStashEdit for bots for sanity"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Thu, 26 May 2016 20:11:01 +0000 (20:11 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 26 May 2016 20:11:01 +0000 (20:11 +0000)
includes/api/ApiStashEdit.php

index ce254c9..40aa4d4 100644 (file)
@@ -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();