# HG changeset patch # User Ganiman # Date 1761683387 14400 # Node ID c400892603ce0e4aba351d234963ff57fe8386eb # Parent 8a131d44fc7fbfac50945e137a23dd04b24a95e4 Updating phpbb3 authentication module for argon2 password support. diff -r 8a131d44fc7f -r c400892603ce mod_auth_phpbb3/mod_auth_phpbb3.lua --- a/mod_auth_phpbb3/mod_auth_phpbb3.lua Mon Oct 27 12:05:07 2025 +0100 +++ b/mod_auth_phpbb3/mod_auth_phpbb3.lua Tue Oct 28 16:29:47 2025 -0400 @@ -11,6 +11,7 @@ local md5 = require "util.hashes".md5; local uuid_gen = require "util.uuid".generate; local have_bcrypt, bcrypt = pcall(require, "bcrypt"); -- available from luarocks +local argon2 = require("argon2") local connection; local params = module:get_option("sql"); @@ -179,6 +180,7 @@ if #hash == 32 then return hash == md5(password, true); end -- legacy PHPBB2 hash if #hash == 34 then return hashCryptPrivate(password, hash) == hash; end if #hash == 60 and have_bcrypt then return bcrypt.verify(password, hash); end + if #hash == 97 then return argon2.verify(hash, password); end module:log("error", "Unsupported hash: %s", hash); return false; end