1
0
mirror of https://github.com/anope/anope.git synced 2026-06-30 21:26:37 +02:00

Fix an off by one error in enc_sha2.

This commit is contained in:
Sadie Powell
2024-03-18 22:04:57 +00:00
parent 413fed474e
commit e6770bc2fd
+1 -1
View File
@@ -160,7 +160,7 @@ public:
if (!is_hmac && hash_method.compare(0, 4, "raw-", 4))
return; // Not a SHA-2 password.
auto provider = GetAlgorithm(hash_method.substr(5));
auto provider = GetAlgorithm(hash_method.substr(is_hmac ? 5 : 4));
if (!provider)
return; // Not a hash for this module.