]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
auth: password-scheme - Use UINT_MAX when calling password_generate_otp
authorAki Tuomi <aki.tuomi@open-xchange.com>
Tue, 1 Sep 2020 06:57:23 +0000 (09:57 +0300)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Thu, 22 Oct 2020 12:16:16 +0000 (12:16 +0000)
src/auth/password-scheme.c

index e22cb3f88aad3864c913e3bdf6cf3f7344ceca72..01c5e8527601e254dca1ac27b6f2c23a233d8174 100644 (file)
@@ -743,7 +743,7 @@ static int otp_verify(const char *plaintext, const struct password_generate_para
        const char *password, *generated;
 
        password = t_strndup(raw_password, size);
-       if (password_generate_otp(plaintext, password, -1, &generated) < 0) {
+       if (password_generate_otp(plaintext, password, UINT_MAX, &generated) < 0) {
                *error_r = "Invalid OTP data in passdb";
                return -1;
        }