Merge "SECURITY: rate-limit and prevent blocked users from changing email"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Thu, 6 Jun 2019 18:59:38 +0000 (18:59 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 6 Jun 2019 18:59:38 +0000 (18:59 +0000)
docs/hooks.txt
includes/HeaderCallback.php
includes/MagicWordArray.php
includes/changes/ChangesList.php
includes/filerepo/RepoGroup.php
includes/jobqueue/JobQueueGroup.php
includes/libs/filebackend/SwiftFileBackend.php

index 7f8b192..976d5c2 100644 (file)
@@ -965,8 +965,8 @@ form via the Preferences form.
 
 'ChangesListInitRows': Batch process change list rows prior to rendering.
 $changesList: ChangesList instance
-$rows: The data that will be rendered. May be a ResultWrapper instance or
-  an array.
+$rows: The data that will be rendered. May be a \Wikimedia\Rdbms\IResultWrapper
+  instance or an array.
 
 'ChangesListInsertArticleLink': Override or augment link to article in RC list.
 &$changesList: ChangesList instance.
index 650a3a8..30cc7f9 100644 (file)
@@ -2,6 +2,9 @@
 
 namespace MediaWiki;
 
+/**
+ * @since 1.29
+ */
 class HeaderCallback {
        private static $headersSentException;
        private static $messageSent = false;
@@ -10,6 +13,8 @@ class HeaderCallback {
         * Register a callback to be called when headers are sent. There can only
         * be one of these handlers active, so all relevant actions have to be in
         * here.
+        *
+        * @since 1.29
         */
        public static function register() {
                header_register_callback( [ __CLASS__, 'callback' ] );
@@ -17,6 +22,8 @@ class HeaderCallback {
 
        /**
         * The callback, which is called by the transport
+        *
+        * @since 1.29
         */
        public static function callback() {
                // Prevent caching of responses with cookies (T127993)
@@ -57,6 +64,8 @@ class HeaderCallback {
        /**
         * Log a warning message if headers have already been sent. This can be
         * called before flushing the output.
+        *
+        * @since 1.29
         */
        public static function warnIfHeadersSent() {
                if ( headers_sent() && !self::$messageSent ) {
index 73d5173..831d5b9 100644 (file)
@@ -30,7 +30,7 @@ use MediaWiki\MediaWikiServices;
  * @ingroup Parser
  */
 class MagicWordArray {
-       /** @var array */
+       /** @var string[] */
        public $names = [];
 
        /** @var MagicWordFactory */
@@ -44,7 +44,7 @@ class MagicWordArray {
        private $regex;
 
        /**
-        * @param array $names
+        * @param string[] $names
         * @param MagicWordFactory|null $factory
         */
        public function __construct( $names = [], MagicWordFactory $factory = null ) {
@@ -65,7 +65,7 @@ class MagicWordArray {
        /**
         * Add a number of magic words by name
         *
-        * @param array $names
+        * @param string[] $names
         */
        public function addArray( $names ) {
                $this->names = array_merge( $this->names, array_values( $names ) );
@@ -95,7 +95,7 @@ class MagicWordArray {
 
        /**
         * Get the base regex
-        * @return array
+        * @return string[]
         */
        public function getBaseRegex() {
                if ( is_null( $this->baseRegex ) ) {
@@ -129,7 +129,7 @@ class MagicWordArray {
 
        /**
         * Get an unanchored regex that does not match parameters
-        * @return array
+        * @return string[]
         */
        public function getRegex() {
                if ( is_null( $this->regex ) ) {
@@ -148,7 +148,7 @@ class MagicWordArray {
        /**
         * Get a regex for matching variables with parameters
         *
-        * @return string
+        * @return string[]
         */
        public function getVariableRegex() {
                return str_replace( "\\$1", "(.*?)", $this->getRegex() );
@@ -157,7 +157,7 @@ class MagicWordArray {
        /**
         * Get a regex anchored to the start of the string that does not match parameters
         *
-        * @return array
+        * @return string[]
         */
        public function getRegexStart() {
                $base = $this->getBaseRegex();
@@ -174,7 +174,7 @@ class MagicWordArray {
        /**
         * Get an anchored regex for matching variables with parameters
         *
-        * @return array
+        * @return string[]
         */
        public function getVariableStartToEndRegex() {
                $base = $this->getBaseRegex();
@@ -190,7 +190,7 @@ class MagicWordArray {
 
        /**
         * @since 1.20
-        * @return array
+        * @return string[]
         */
        public function getNames() {
                return $this->names;
index 85035bc..34adea9 100644 (file)
@@ -23,7 +23,7 @@
  */
 use MediaWiki\Linker\LinkRenderer;
 use MediaWiki\MediaWikiServices;
-use Wikimedia\Rdbms\ResultWrapper;
+use Wikimedia\Rdbms\IResultWrapper;
 
 class ChangesList extends ContextSource {
        const CSS_CLASS_PREFIX = 'mw-changeslist-';
@@ -298,7 +298,7 @@ class ChangesList extends ContextSource {
        }
 
        /**
-        * @param ResultWrapper|array $rows
+        * @param IResultWrapper|array $rows
         */
        public function initChangesListRows( $rows ) {
                Hooks::run( 'ChangesListInitRows', [ $this, $rows ] );
index 8047835..e474ad3 100644 (file)
@@ -47,7 +47,7 @@ class RepoGroup {
        /** @var array */
        protected $foreignInfo;
 
-       /** @var ProcessCacheLRU */
+       /** @var MapCacheLRU */
        protected $cache;
 
        /** Maximum number of cache items */
index 7a0d4ea..2937d01 100644 (file)
@@ -31,7 +31,7 @@ class JobQueueGroup {
        /** @var JobQueueGroup[] */
        protected static $instances = [];
 
-       /** @var ProcessCacheLRU */
+       /** @var MapCacheLRU */
        protected $cache;
 
        /** @var string Wiki domain ID */
index 2587812..dc5aa22 100644 (file)
@@ -62,7 +62,7 @@ class SwiftFileBackend extends FileBackendStore {
        /** @var BagOStuff */
        protected $srvCache;
 
-       /** @var ProcessCacheLRU Container stat cache */
+       /** @var MapCacheLRU Container stat cache */
        protected $containerStatCache;
 
        /** @var array */