From: Timo Sirainen Date: Wed, 10 Aug 2016 14:15:21 +0000 (+0300) Subject: auth: Removed redundant noauthenticate checks. X-Git-Tag: 2.2.26~381 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=492cbf3dda27781a988f0dd1a9ab021094684a89;p=thirdparty%2Fdovecot%2Fcore.git auth: Removed redundant noauthenticate checks. Now that noauthenticate also adds nopassword field. --- diff --git a/src/auth/auth-request.c b/src/auth/auth-request.c index f3de47e610..dfeaa83fda 100644 --- a/src/auth/auth-request.c +++ b/src/auth/auth-request.c @@ -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; diff --git a/src/auth/passdb-sql.c b/src/auth/passdb-sql.c index d3f391211a..81a3ba61dc 100644 --- a/src/auth/passdb-sql.c +++ b/src/auth/passdb-sql.c @@ -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;