dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add tests for WikiMap and WikiReference
[lhc/web/wiklou.git]
/
includes
/
api
/
ApiBase.php
diff --git
a/includes/api/ApiBase.php
b/includes/api/ApiBase.php
index
393ff49
..
7b71e6c
100644
(file)
--- a/
includes/api/ApiBase.php
+++ b/
includes/api/ApiBase.php
@@
-1229,7
+1229,7
@@
abstract class ApiBase extends ContextSource {
$this->dieUsage( 'Specified user does not exist', 'bad_wlowner' );
}
$token = $user->getOption( 'watchlisttoken' );
$this->dieUsage( 'Specified user does not exist', 'bad_wlowner' );
}
$token = $user->getOption( 'watchlisttoken' );
- if ( $token == '' ||
$token != $params['token']
) {
+ if ( $token == '' ||
!hash_equals( $token, $params['token'] )
) {
$this->dieUsage(
'Incorrect watchlist token provided -- please set a correct token in Special:Preferences',
'bad_wltoken'
$this->dieUsage(
'Incorrect watchlist token provided -- please set a correct token in Special:Preferences',
'bad_wltoken'
@@
-2870,6
+2870,16
@@
abstract class ApiBase extends ContextSource {
return $this->getResult()->getData();
}
return $this->getResult()->getData();
}
+ /**
+ * Call wfTransactionalTimeLimit() if this request was POSTed
+ * @since 1.26
+ */
+ protected function useTransactionalTimeLimit() {
+ if ( $this->getRequest()->wasPosted() ) {
+ wfTransactionalTimeLimit();
+ }
+ }
+
/**@}*/
}
/**@}*/
}