From dede5e9bf14e14cbcc5c6916a3eb6941813fe051 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Wed, 25 Jan 2023 00:08:04 +0000 Subject: Work around a bug in reading the config for the Argon2 module. ProviderConfig::version is set to an argon2 version not a base 10 version so using it as a default for the config may result in the default being ignored. Luckily 0x10 and 0x12 are 16 and 18 respectively so we can just allow them as valid values until v4 where we can eradicate the SanitiseArgon2Version function and use getEnum instead. --- src/modules/extra/m_argon2.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/modules/extra/m_argon2.cpp') diff --git a/src/modules/extra/m_argon2.cpp b/src/modules/extra/m_argon2.cpp index f2b564a92..9e803a0d6 100644 --- a/src/modules/extra/m_argon2.cpp +++ b/src/modules/extra/m_argon2.cpp @@ -54,8 +54,11 @@ class ProviderConfig // match better. switch (version) { + case ARGON2_VERSION_10: case 10: return ARGON2_VERSION_10; + + case ARGON2_VERSION_13: case 13: return ARGON2_VERSION_13; } -- cgit v1.3.1-10-gc9f91