dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
75f8e00
)
Bail out in ApiStashEdit for bots for sanity
author
Aaron Schulz
<aschulz@wikimedia.org>
Thu, 26 May 2016 19:04:22 +0000
(12:04 -0700)
committer
Ori.livneh
<ori@wikimedia.org>
Thu, 26 May 2016 19:59:16 +0000
(19:59 +0000)
checkCache() is disabled in this case anyway.
Change-Id: I1c18585eecc1a7c4c0e24546799c7ee448b3ea57
includes/api/ApiStashEdit.php
patch
|
blob
|
history
diff --git
a/includes/api/ApiStashEdit.php
b/includes/api/ApiStashEdit.php
index
ce254c9
..
40aa4d4
100644
(file)
--- 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();