dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Merge "mediawiki.api.category: Avoid exceptions"
[lhc/web/wiklou.git]
/
includes
/
password
/
MWSaltedPassword.php
diff --git
a/includes/password/MWSaltedPassword.php
b/includes/password/MWSaltedPassword.php
index
26730b1
..
733984c
100644
(file)
--- a/
includes/password/MWSaltedPassword.php
+++ b/
includes/password/MWSaltedPassword.php
@@
-42,5
+42,9
@@
class MWSaltedPassword extends ParameterizedPassword {
}
$this->hash = md5( $this->args[0] . '-' . md5( $plaintext ) );
+
+ if ( !is_string( $this->hash ) || strlen( $this->hash ) < 32 ) {
+ throw new PasswordError( 'Error when hashing password.' );
+ }
}
}