# HG changeset patch # User Waqas Hussain # Date 1315676238 -18000 # Node ID eaafb38daa5e19235db017079424d0a0d1a30f5b # Parent 2a2b70e1a99806237db10777bdf94a86d29f2988 mod_auth_phpbb3: Support legacy PHPBB2 password hashes (simple MD5). diff -r 2a2b70e1a998 -r eaafb38daa5e mod_auth_phpbb3/mod_auth_phpbb3.lua --- 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)