Software /
code /
prosody-modules
Diff
mod_auth_phpbb3/mod_auth_phpbb3.lua @ 420:eaafb38daa5e
mod_auth_phpbb3: Support legacy PHPBB2 password hashes (simple MD5).
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Sat, 10 Sep 2011 22:37:18 +0500 |
parent | 419:2a2b70e1a998 |
child | 421:816d8e3e83a3 |
line wrap: on
line diff
--- a/mod_auth_phpbb3/mod_auth_phpbb3.lua Sat Sep 10 22:35:59 2011 +0500 +++ b/mod_auth_phpbb3/mod_auth_phpbb3.lua Sat Sep 10 22:37:18 2011 +0500 @@ -178,6 +178,7 @@ function provider.test_password(username, password) --module:log("debug", "test_password '%s' for user %s", tostring(password), tostring(username)); local hash = get_password(username); + if hash and #hash == 32 then return hash == md5(password, true); end -- legacy PHPBB2 hash return hash and phpbbCheckHash(password, hash); end function provider.user_exists(username)