summaryrefslogtreecommitdiff
path: root/includes/password/MWOldPassword.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/password/MWOldPassword.php')
-rw-r--r--includes/password/MWOldPassword.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/includes/password/MWOldPassword.php b/includes/password/MWOldPassword.php
index afa5cacc..43c13553 100644
--- a/includes/password/MWOldPassword.php
+++ b/includes/password/MWOldPassword.php
@@ -44,5 +44,9 @@ class MWOldPassword extends ParameterizedPassword {
$this->args = array();
$this->hash = md5( $plaintext );
}
+
+ if ( !is_string( $this->hash ) || strlen( $this->hash ) < 32 ) {
+ throw new PasswordError( 'Error when hashing password.' );
+ }
}
}