aboutsummaryrefslogtreecommitdiff
path: root/src/modules/extra/m_argon2.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2023-01-25 00:08:04 +0000
committerGravatar Sadie Powell2023-01-25 00:55:57 +0000
commitdede5e9bf14e14cbcc5c6916a3eb6941813fe051 (patch)
treefe2470016c9af1204d76574bf969bfdcf8a720cd /src/modules/extra/m_argon2.cpp
parentFix PackageInfo directives in extra modules. (diff)
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.
Diffstat (limited to 'src/modules/extra/m_argon2.cpp')
-rw-r--r--src/modules/extra/m_argon2.cpp3
1 files changed, 3 insertions, 0 deletions
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;
}