Merge "Perform a permission check on the title when changing the page language"
[lhc/web/wiklou.git] / maintenance / createCommonPasswordCdb.php
index 87e7e08..f7e0c0f 100644 (file)
@@ -26,9 +26,11 @@ require_once __DIR__ . '/Maintenance.php';
 /**
  * Maintenance script to create common password cdb database.
  *
- * Meant to take a file like
- * https://github.com/danielmiessler/SecLists/blob/master/Passwords/rockyou.txt?raw=true
- * as input.
+ * Meant to take a file like those from
+ * https://github.com/danielmiessler/SecLists
+ * For example:
+ * https://github.com/danielmiessler/SecLists/blob/fe2b40dd84/Passwords/rockyou.txt?raw=true
+ *
  * @see serialized/commonpasswords.cdb and PasswordPolicyChecks::checkPopularPasswordBlacklist
  * @since 1.27
  * @ingroup Maintenance
@@ -69,7 +71,7 @@ class GenerateCommonPassword extends Maintenance {
                try {
                        $db = \Cdb\Writer::open( $outfile );
 
-                       $alreadyWritten = array();
+                       $alreadyWritten = [];
                        $skipped = 0;
                        for ( $i = 0; ( $i - $skipped ) < $limit; $i++ ) {
                                if ( feof( $file ) ) {
@@ -109,7 +111,6 @@ class GenerateCommonPassword extends Maintenance {
                } catch ( \Cdb\Exception $e ) {
                        $this->error( "Error writing cdb file: " . $e->getMessage(), 2 );
                }
-
        }
 }