if ($this->config->passtype === 'plaintext') {
return ($fromdb == $extpassword);
} else if ($this->config->passtype === 'md5') {
- return ($fromdb == md5($extpassword));
+ return (strtolower($fromdb) == md5($extpassword));
} else if ($this->config->passtype === 'sha1') {
- return ($fromdb == sha1($extpassword));
+ return (strtolower($fromdb) == sha1($extpassword));
} else if ($this->config->passtype === 'saltedcrypt') {
require_once($CFG->libdir.'/password_compat/lib/password.php');
return password_verify($extpassword, $fromdb);
--- /dev/null
+This files describes API changes in /auth/db/*,
+information provided here is intended especially for developers.
+
+=== 2.9 ===
+
+* Plain text password matching is now always case sensitive, it does not
+ depend on the database sensitiveness anymore.