Merge "Revert "Enable AuthManager by default""
[lhc/web/wiklou.git] / includes / password / MWOldPassword.php
index 2150e56..84675c1 100644 (file)
@@ -44,5 +44,9 @@ class MWOldPassword extends ParameterizedPassword {
                        $this->args = [];
                        $this->hash = md5( $plaintext );
                }
+
+               if ( !is_string( $this->hash ) || strlen( $this->hash ) < 32 ) {
+                       throw new PasswordError( 'Error when hashing password.' );
+               }
        }
 }