mod_auth_phpbb3: Support legacy PHPBB2 password hashes (simple MD5).
--- 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)