Merge "Show password policy flags on Special:PasswordPolicies"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Sat, 2 Mar 2019 03:51:05 +0000 (03:51 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Sat, 2 Mar 2019 03:51:05 +0000 (03:51 +0000)
1  2 
includes/DefaultSettings.php
languages/i18n/en.json
languages/i18n/qqq.json

@@@ -940,7 -940,7 +940,7 @@@ $wgFileBlacklist = 
        # HTML may contain cookie-stealing JavaScript and web bugs
        'html', 'htm', 'js', 'jsb', 'mhtml', 'mht', 'xhtml', 'xht',
        # PHP scripts may execute arbitrary code on the server
 -      'php', 'phtml', 'php3', 'php4', 'php5', 'phps',
 +      'php', 'phtml', 'php3', 'php4', 'php5', 'phps', 'phar',
        # Other types that may be interpreted by some servers
        'shtml', 'jhtml', 'pl', 'py', 'cgi',
        # May contain harmful executables for Windows victims
@@@ -1234,7 -1234,7 +1234,7 @@@ $wgAllowTitlesInSVG = false
   *
   * @since 1.33
   */
 -$wgMediaInTargetLanguage = false;
 +$wgMediaInTargetLanguage = true;
  
  /**
   * The maximum number of pixels a source image can have if it is to be scaled
@@@ -2456,20 -2456,23 +2456,20 @@@ $wgMainWANCache = false
   *
   * The format is an associative array where the key is a cache identifier, and
   * the value is an associative array of parameters. The "cacheId" parameter is
 - * a cache identifier from $wgObjectCaches. The "channels" parameter is a map of
 - * actions ('purge') to PubSub channels defined in $wgEventRelayerConfig.
 - * The "loggroup" parameter controls where log events are sent.
 + * a cache identifier from $wgObjectCaches. The "loggroup" parameter controls
 + * where log events are sent.
   *
   * @since 1.26
   */
  $wgWANObjectCaches = [
        CACHE_NONE => [
                'class'    => WANObjectCache::class,
 -              'cacheId'  => CACHE_NONE,
 -              'channels' => []
 +              'cacheId'  => CACHE_NONE
        ]
        /* Example of a simple single data-center cache:
        'memcached-php' => [
                'class'    => WANObjectCache::class,
 -              'cacheId'  => 'memcached-php',
 -              'channels' => [ 'purge' => 'wancache-main-memcached-purge' ]
 +              'cacheId'  => 'memcached-php'
        ]
        */
  ];
@@@ -4480,6 -4483,13 +4480,13 @@@ $wgCentralIdLookupProvider = 'local'
   *            100,000 commonly used passwords. Due to the size of the list this
   *      is a probabilistic test.
   *
+  * If you add custom checks, for Special:PasswordPolicies to display them correctly,
+  * every check should have a corresponding passwordpolicies-policy-<check> message,
+  * and every settings field other than 'value' should have a corresponding
+  * passwordpolicies-policyflag-<flag> message (<check> and <flag> are in lowercase).
+  * The check message receives the policy value as a parameter, the flag message
+  * receives the flag value (or values if it's an array).
+  *
   * @since 1.26
   * @see PasswordPolicyChecks
   * @see User::checkPasswordValidity()
@@@ -4782,24 -4792,6 +4789,24 @@@ $wgPasswordConfig = 
                'cost' => '30000',
                'length' => '64',
        ],
 +      'argon2' => [
 +              'class' => Argon2Password::class,
 +
 +              // Algorithm used:
 +              // * 'argon2i' is optimized against side-channel attacks (PHP 7.2+)
 +              // * 'argon2id' is optimized against both side-channel and GPU cracking (PHP 7.3+)
 +              // * 'auto' to use best available algorithm. If you're using more than one server, be
 +              //   careful when you're mixing PHP versions because newer PHP might generate hashes that
 +              //   older versions might would not understand.
 +              'algo' => 'auto',
 +
 +              // The parameters below are the same as options accepted by password_hash().
 +              // Set them to override that function's defaults.
 +              //
 +              // 'memory_cost' => PASSWORD_ARGON2_DEFAULT_MEMORY_COST,
 +              // 'time_cost' => PASSWORD_ARGON2_DEFAULT_TIME_COST,
 +              // 'threads' => PASSWORD_ARGON2_DEFAULT_THREADS,
 +      ],
  ];
  
  /**
@@@ -9037,24 -9029,6 +9044,24 @@@ $wgEnableRollbackConfirmationPrompt = t
   */
  $wgEnableBlockNoticeStats = false;
  
 +/**
 + * Origin Trials tokens.
 + *
 + * @since 1.34
 + * @var array
 + */
 +$wgOriginTrials = [];
 +
 +/**
 + * Enable client-side Priority Hints.
 + *
 + * @warning EXPERIMENTAL!
 + *
 + * @since 1.34
 + * @var bool
 + */
 +$wgPriorityHints = false;
 +
  /**
   * For really cool vim folding this needs to be at the end:
   * vim: foldmarker=@{,@} foldmethod=marker
diff --combined languages/i18n/en.json
        "blockedtext": "<strong>Your username or IP address has been blocked.</strong>\n\nThe block was made by $1.\nThe reason given is <em>$2</em>.\n\n* Start of block: $8\n* Expiration of block: $6\n* Intended blockee: $7\n\nYou can contact $1 or another [[{{MediaWiki:Grouppage-sysop}}|administrator]] to discuss the block.\nYou cannot use the \"{{int:emailuser}}\" feature unless a valid email address is specified in your [[Special:Preferences|account preferences]] and you have not been blocked from using it.\nYour current IP address is $3, and the block ID is #$5.\nPlease include all above details in any queries you make.",
        "autoblockedtext": "Your IP address has been automatically blocked because it was used by another user, who was blocked by $1.\nThe reason given is:\n\n:<em>$2</em>\n\n* Start of block: $8\n* Expiration of block: $6\n* Intended blockee: $7\n\nYou may contact $1 or one of the other [[{{MediaWiki:Grouppage-sysop}}|administrators]] to discuss the block.\n\nNote that you may not use the \"{{int:emailuser}}\" feature unless you have a valid email address registered in your [[Special:Preferences|user preferences]] and you have not been blocked from using it.\n\nYour current IP address is $3, and the block ID is #$5.\nPlease include all above details in any queries you make.",
        "systemblockedtext": "Your username or IP address has been automatically blocked by MediaWiki.\nThe reason given is:\n\n:<em>$2</em>\n\n* Start of block: $8\n* Expiration of block: $6\n* Intended blockee: $7\n\nYour current IP address is $3.\nPlease include all above details in any queries you make.",
 -      "actionblockedtext": "You have been blocked from performing this action.",
        "blockednoreason": "no reason given",
        "whitelistedittext": "Please $1 to edit pages.",
        "confirmedittext": "You must confirm your email address before editing pages.\nPlease set and validate your email address through your [[Special:Preferences|user preferences]].",
        "anoncontribs": "Contributions",
        "contribsub2": "For {{GENDER:$3|$1}} ($2)",
        "contributions-userdoesnotexist": "User account \"$1\" is not registered.",
 +      "negative-namespace-not-supported": "Namespaces with negative values are not supported.",
        "nocontribs": "No changes were found matching these criteria.",
        "uctop": "current",
        "month": "From month (and earlier):",
        "passwordpolicies-group": "Group",
        "passwordpolicies-policies": "Policies",
        "passwordpolicies-policy-display": "<span class=\"passwordpolicies-policy\">$1 <code>($2)</code></span>",
+       "passwordpolicies-policy-displaywithflags": "<span class=\"passwordpolicies-policy\">$1 <code>($2)</code></span> <span class=\"passwordpolicies-policy-flags\">($3)</span>",
        "passwordpolicies-policy-minimalpasswordlength": "Password must be at least $1 {{PLURAL:$1|character|characters}} long",
        "passwordpolicies-policy-minimumpasswordlengthtologin": "Password must be at least $1 {{PLURAL:$1|character|characters}} long to be able to login",
        "passwordpolicies-policy-passwordcannotmatchusername": "Password cannot be the same as username",
        "passwordpolicies-policy-maximalpasswordlength": "Password must be less than $1 {{PLURAL:$1|character|characters}} long",
        "passwordpolicies-policy-passwordcannotbepopular": "Password cannot be {{PLURAL:$1|the popular password|in the list of $1 popular passwords}}",
        "passwordpolicies-policy-passwordnotinlargeblacklist": "Password cannot be in the list of 100,000 most commonly used passwords.",
+       "passwordpolicies-policyflag-forcechange": "must change on login",
        "easydeflate-invaliddeflate": "Content provided is not properly deflated",
        "unprotected-js": "For security reasons JavaScript cannot be loaded from unprotected pages. Please only create javascript in the MediaWiki: namespace or as a User subpage"
  }
diff --combined languages/i18n/qqq.json
                        "BadDog",
                        "The Discoverer",
                        "Bencemac",
 -                      "Zoranzoki21"
 +                      "Zoranzoki21",
 +                      "Woytecr"
                ]
        },
        "sidebar": "{{notranslate}}",
        "blockedtext": "Text displayed to blocked users.\n\n\"email this user\" should be consistent with {{msg-mw|Emailuser}}.\n\nParameters:\n* $1 - the blocking sysop (with a link to his/her userpage)\n* $2 - the reason for the block\n* $3 - the current IP address of the blocked user\n* $4 - (Unused) the blocking sysop's username (plain text, without the link)\n* $5 - the unique numeric identifier of the applied autoblock\n* $6 - the expiry of the block\n* $7 - the intended target of the block (what the blocking user specified in the blocking form)\n* $8 - the timestamp when the block started\nSee also:\n* {{msg-mw|Grouppage-sysop}}\n* {{msg-mw|Autoblockedtext|notext=1}}\n* {{msg-mw|Systemblockedtext|notext=1}}",
        "autoblockedtext": "Text displayed to automatically blocked users.\n\n\"email this user\" should be consistent with {{msg-mw|Emailuser}}.\n\nParameters:\n* $1 - the blocking sysop (with a link to his/her userpage)\n* $2 - the reason for the block (in case of autoblocks: {{msg-mw|autoblocker}})\n* $3 - the current IP address of the blocked user\n* $4 - (Unused) the blocking sysop's username (plain text, without the link). Use it for GENDER.\n* $5 - the unique numeric identifier of the applied autoblock\n* $6 - the expiry of the block\n* $7 - the intended target of the block (what the blocking user specified in the blocking form)\n* $8 - the timestamp when the block started\nSee also:\n* {{msg-mw|Grouppage-sysop}}\n* {{msg-mw|Blockedtext|notext=1}}\n* {{msg-mw|Systemblockedtext|notext=1}}",
        "systemblockedtext": "Text displayed to requests blocked by MediaWiki configuration.\n\n\"email this user\" should be consistent with {{msg-mw|Emailuser}}.\n\nParameters:\n* $1 - (Unused) A dummy user attributed as the blocker, possibly as a link to a user page.\n* $2 - the reason for the block\n* $3 - the current IP address of the blocked user\n* $4 - (Unused) the dummy blocking user's username (plain text, without the link).\n* $5 - A short string indicating the type of system block.\n* $6 - the expiry of the block\n* $7 - the intended target of the block\n* $8 - the timestamp when the block started\nSee also:\n* {{msg-mw|Grouppage-sysop}}\n* {{msg-mw|Blockedtext|notext=1}}\n* {{msg-mw|Autoblockedtext|notext=1}}",
 -      "actionblockedtext": "Text displayed when a user is blocked from performing an action, but no matching block for the user exists. This can happen if an extension forces a user to be blocked.",
        "blockednoreason": "Substituted with <code>$2</code> in the following message if the reason is not given:\n* {{msg-mw|cantcreateaccount-text}}.\n{{Identical|No reason given}}",
        "whitelistedittext": "Used as error message. Parameters:\n* $1 - a link to [[Special:UserLogin]] with {{msg-mw|loginreqlink}} as link description\n* $2 - an URL to the same\n\nSee also:\n* {{msg-mw|Nocreatetext}}\n* {{msg-mw|Uploadnologintext}}\n* {{msg-mw|Loginreqpagetext}}",
        "confirmedittext": "Used as error message.",
        "anoncontribs": "Same as {{msg-mw|mycontris}} but used for non-logged-in users.\n\nSee also:\n* {{msg-mw|Accesskey-pt-anoncontribs}}\n* {{msg-mw|Tooltip-pt-anoncontribs}}\n{{Identical|Contribution}}",
        "contribsub2": "Contributions for \"user\" (links). Parameters:\n* $1 is an IP address or a username, with a link which points to the user page (if registered user).\n* $2 is list of tool links. The list contains a link which has text {{msg-mw|Sp-contributions-talk}}.\n* $3 is a plain text username used for GENDER.\n{{Identical|For $1}}",
        "contributions-userdoesnotexist": "This message is used in [[Special:Contributions]]. It is used to tell the user that the name he searched for doesn't exist.\n\nParameters:\n* $1 - a username\n{{Identical|Userdoesnotexist}}",
 +      "negative-namespace-not-supported": "This message is used in [[Special:Contributions]] to tell users that use namespaces with negative value. It not supported as associated namespace(s) doesn't exist.",
        "nocontribs": "Used in [[Special:Contributions]] and [[Special:DeletedContributions]].\n\nSee examples: [[Special:Contributions/x]] and [[Special:DeletedContributions/x]].\n\nParameters:\n* $1 - (Unused) the user name",
        "uctop": "This message is used in [[Special:Contributions]]. It is used to show that a particular edit was the last made to a page. Example: 09:57, 11 February 2008 (hist) (diff) Pagenameā€Ž (edit summary) (current)\n{{Identical|Current}}",
        "month": "Used in [[Special:Contributions]] and history pages ([{{fullurl:Sandbox|action=history}} example]), as label for a dropdown box to select a specific month to view the edits made in that month, and the earlier months. See also {{msg-mw|year}}.",
        "logentry-block-block": "{{Logentry|[[Special:Log/block]]}}\n* $4 - user name for gender or empty string for autoblocks\n* $5 - the block duration, localized and formatted with the english tooltip\n* $6 - block detail flags or empty string\n\nCf. {{msg-mw|Blocklogentry}}",
        "logentry-block-unblock": "{{Logentry|[[Special:Log/block]]}}\n* $4 - user name for gender or empty string for autoblocks\n\nCf. {{msg-mw|Unblocklogentry}}",
        "logentry-block-reblock": "{{Logentry|[[Special:Log/block]]}}\n* $4 - user name for gender or empty string for autoblocks\n* $5 - the block duration, localized and formatted with the english tooltip\n* $6 - block detail flags or empty string\n\nCf. {{msg-mw|Reblock-logentry}}",
 -      "logentry-partialblock-block-page": "Page portion of {{msg-mw|logentry-partialblock-block}}\n* $1 - number of pages\n* - $2 list of pages",
 -      "logentry-partialblock-block-ns": "Namespace portion of {{msg-mw|logentry-partialblock-block}}\n* $1 - number of namespaces\n* - $2 list of namespaces",
 +      "logentry-partialblock-block-page": "Page portion of {{msg-mw|logentry-partialblock-block}}\n* $1 - number of pages\n* $2 - list of pages",
 +      "logentry-partialblock-block-ns": "Namespace portion of {{msg-mw|logentry-partialblock-block}}\n* $1 - number of namespaces\n* $2 - list of namespaces",
        "logentry-partialblock-block": "{{Logentry|[[Special:Log/block]]}}\n* $4 - user name for gender or empty string for autoblocks\n* $5 - the block duration, localized and formatted with the english tooltip\n* $6 - block detail flags or empty string\n* $7 - Restrictions list {{msg-mw|logentry-partialblock-block-page}} and/or {{msg-mw|logentry-partialblock-block-ns}}\n\nCf. {{msg-mw|Blocklogentry}}",
        "logentry-partialblock-reblock": "{{Logentry|[[Special:Log/block]]}}\n* $4 - user name for gender or empty string for autoblocks\n* $5 - the block duration, localized and formatted with the english tooltip\n* $6 - block detail flags or empty string\n* $7 - Restrictions list {{msg-mw|logentry-partialblock-block-page}} and/or {{msg-mw|logentry-partialblock-block-ns}}\n\nCf. {{msg-mw|Reblock-logentry}}",
        "logentry-non-editing-block-block": "{{Logentry|[[Special:Log/block]]}}\n* $4 - user name for gender or empty string for autoblocks\n* $5 - the block duration, localized and formatted with the english tooltip\n* $6 - block detail flags or empty string\n\nCf. {{msg-mw|Blocklogentry}}",
        "passwordpolicies-summary": "The description used on [[Special:PasswordPolicies]].\n\nRefers to {{msg-mw|Passwordpolicies-helppage}}.",
        "passwordpolicies-group": "The title of the column in the table, about user groups (like you are in the ''translator'' group).\n\n{{Identical|Group}}\n{{Related|Passwordpolicies}}",
        "passwordpolicies-policies": "The title of the column in the table, about password policies.\n{{Related|Passwordpolicies}}",
-       "passwordpolicies-policy-display": "{{optional}}\nParameters:\n* $1 - the text from the \"passwordpolicies-policy-...\" messages, i.e. {{msg-mw|passwordpolicies-policy-minimalpasswordlength}}\n* $2 - the name of this password policy",
+       "passwordpolicies-policy-display": "{{optional}}\nParameters:\n* $1 - the text from the \"passwordpolicies-policy-...\" messages, e.g. {{msg-mw|passwordpolicies-policy-minimalpasswordlength}}\n* $2 - the name of this password policy",
+       "passwordpolicies-policy-displaywithflags": "{{optional}}\nParameters:\n* $1 - the text from the \"passwordpolicies-policy-...\" messages, i.e. {{msg-mw|passwordpolicies-policy-minimalpasswordlength}}\n* $2 - the name of this password policy\n* $3 - comma-separated list of the text from the \"passwordpolicies-policyflag-...\" messages, e.g. {{msg-mw|passwordpolicies-policyflag-forcechange}}",
        "passwordpolicies-policy-minimalpasswordlength": "Password policy that enforces a minimum number of characters a password must be. $1 - minimum number of characters that a password can be",
        "passwordpolicies-policy-minimumpasswordlengthtologin": "Password policy that enforces a minimum number of characters a password must be to be able to login to the wiki. $1 - minimum number of characters that a password can be to be able to login",
        "passwordpolicies-policy-passwordcannotmatchusername": "Password policy that enforces that the password of the account cannot be the same as the username",
        "passwordpolicies-policy-maximalpasswordlength": "Password policy that enforces a maximum number of characters a password must be. $1 - maximum number of characters that a password can be",
        "passwordpolicies-policy-passwordcannotbepopular": "Password policy that enforces that a password is not in a list of $1 number of \"popular\" passwords. $1 - number of popular passwords the password will be checked against",
        "passwordpolicies-policy-passwordnotinlargeblacklist": "Password policy that enforces that a password is not in a list of 100,000 number of \"popular\" passwords.",
+       "passwordpolicies-policyflag-forcechange": "Password policy flag that enforces changing invalid passwords on login.",
        "easydeflate-invaliddeflate": "Error message if the content passed to easydeflate was not deflated (compressed) properly",
        "unprotected-js": "Error message shown when trying to load javascript via action=raw that is not protected"
  }