Merge "password: Move commonpasswords.cdb to includes/password/"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Tue, 14 Aug 2018 23:53:19 +0000 (23:53 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Tue, 14 Aug 2018 23:53:19 +0000 (23:53 +0000)
includes/DefaultSettings.php
includes/password/commonpasswords.cdb [new file with mode: 0644]
maintenance/createCommonPasswordCdb.php
serialized/.gitignore [deleted file]
serialized/.htaccess [deleted file]
serialized/commonpasswords.cdb [deleted file]
tests/phpunit/includes/password/PasswordPolicyChecksTest.php

index 0ed476e..75f9b95 100644 (file)
@@ -8826,7 +8826,7 @@ $wgSearchRunSuggestedQuery = true;
  * @since 1.27
  * @var string path to file
  */
-$wgPopularPasswordFile = __DIR__ . '/../serialized/commonpasswords.cdb';
+$wgPopularPasswordFile = __DIR__ . '/password/commonpasswords.cdb';
 
 /*
  * Max time (in seconds) a user-generated transaction can spend in writes.
diff --git a/includes/password/commonpasswords.cdb b/includes/password/commonpasswords.cdb
new file mode 100644 (file)
index 0000000..7b7b043
Binary files /dev/null and b/includes/password/commonpasswords.cdb differ
index de611ec..0aa8ce8 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * Create serialized/commonpasswords.cdb
+ * Generate includes/password/commonpasswords.cdb
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -31,7 +31,7 @@ require_once __DIR__ . '/Maintenance.php';
  * For example:
  * https://github.com/danielmiessler/SecLists/blob/fe2b40dd84/Passwords/rockyou.txt?raw=true
  *
- * @see serialized/commonpasswords.cdb and PasswordPolicyChecks::checkPopularPasswordBlacklist
+ * @see PasswordPolicyChecks::checkPopularPasswordBlacklist
  * @since 1.27
  * @ingroup Maintenance
  */
@@ -44,7 +44,7 @@ class CreateCommonPasswordCdb extends Maintenance {
                $this->addArg( 'inputfile', 'List of passwords (one per line) to use or - for stdin', true );
                $this->addArg(
                        'output',
-                       "Location to write CDB file to (Try $IP/serialized/commonpasswords.cdb)",
+                       "Location to write CDB file to (Try $IP/includes/password/commonpasswords.cdb)",
                        true
                );
        }
diff --git a/serialized/.gitignore b/serialized/.gitignore
deleted file mode 100644 (file)
index 33b9f02..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-/allkeys.txt
-/ucd.all.grouped.xml
-/ucd.all.grouped.zip
diff --git a/serialized/.htaccess b/serialized/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/serialized/commonpasswords.cdb b/serialized/commonpasswords.cdb
deleted file mode 100644 (file)
index 7b7b043..0000000
Binary files a/serialized/commonpasswords.cdb and /dev/null differ
index 5ddbe27..2d20f2c 100644 (file)
@@ -150,7 +150,7 @@ class PasswordPolicyChecksTest extends MediaWikiTestCase {
                global $IP;
                $this->setMwGlobals( [
                        'wgSitename' => 'sitename',
-                       'wgPopularPasswordFile' => "$IP/serialized/commonpasswords.cdb"
+                       'wgPopularPasswordFile' => "$IP/includes/password/commonpasswords.cdb"
                ] );
                $user = User::newFromName( 'username' );
                $status = PasswordPolicyChecks::checkPopularPasswordBlacklist( PHP_INT_MAX, $user, $password );