]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
auth: Removed redundant noauthenticate checks.
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Wed, 10 Aug 2016 14:15:21 +0000 (17:15 +0300)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Wed, 10 Aug 2016 23:14:55 +0000 (02:14 +0300)
Now that noauthenticate also adds nopassword field.

src/auth/auth-request.c
src/auth/passdb-sql.c

index f3de47e6105ff83661f424598dd54bc2b2fa0b54..dfeaa83fdad4dc47be03cdf391e338a24e6e8d6e 100644 (file)
@@ -2280,8 +2280,7 @@ int auth_request_password_verify(struct auth_request *request,
                return 0;
        }
 
-       if (auth_fields_exists(request->extra_fields, "nopassword") ||
-           auth_fields_exists(request->extra_fields, "noauthenticate")) {
+       if (auth_fields_exists(request->extra_fields, "nopassword")) {
                auth_request_log_debug(request, subsystem,
                                        "Allowing any password");
                return 1;
index d3f391211a3b8ffc41fe64ab20843cd4334bf2d0..81a3ba61dc439b0467e341777812cbc04bcd9369 100644 (file)
@@ -99,8 +99,7 @@ static void sql_query_callback(struct sql_result *result,
                        auth_request_log_error(auth_request, AUTH_SUBSYS_DB,
                                "Password query returned multiple matches");
                } else if (auth_request->passdb_password == NULL &&
-                          !auth_fields_exists(auth_request->extra_fields, "nopassword") &&
-                          !auth_fields_exists(auth_request->extra_fields, "noauthenticate")) {
+                          !auth_fields_exists(auth_request->extra_fields, "nopassword")) {
                        auth_request_log_info(auth_request, AUTH_SUBSYS_DB,
                                "Empty password returned without nopassword");
                        passdb_result = PASSDB_RESULT_PASSWORD_MISMATCH;