]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
auth: Fixed checking if delay_until is too large
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Wed, 29 Jun 2016 20:54:46 +0000 (23:54 +0300)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Wed, 29 Jun 2016 20:54:46 +0000 (23:54 +0300)
src/auth/auth-request.c

index 4e9a428b922f2dff1c52ed16768c562514fd3a2f..072622d7c1e9b89dd038ae411335c6c529181bec 100644 (file)
@@ -1697,7 +1697,7 @@ void auth_request_set_field(struct auth_request *request,
                                "Invalid delay_until timestamp '%s'", value);
                } else if (timestamp <= ioloop_time) {
                        /* no more delays */
-               } else if (ioloop_time - timestamp > AUTH_REQUEST_MAX_DELAY_SECS) {
+               } else if (timestamp - ioloop_time > AUTH_REQUEST_MAX_DELAY_SECS) {
                        auth_request_log_error(request, AUTH_SUBSYS_DB,
                                "delay_until timestamp %s is too much in the future, failing", value);
                        request->failed = TRUE;