From: laodc Date: Mon, 21 Aug 2023 09:29:28 +0000 (+0700) Subject: changed errors to warnings. X-Git-Tag: 3.7.1~69^2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ee05b36e774253e307b171ffdeb261c1f907ad75;p=thirdparty%2Frspamd.git changed errors to warnings. nullptr on contructor was never meant to be there --- diff --git a/lualib/lua_redis.lua b/lualib/lua_redis.lua index 377541f878..8ae40da5bc 100644 --- a/lualib/lua_redis.lua +++ b/lualib/lua_redis.lua @@ -1521,7 +1521,7 @@ local function redis_connect_sync(redis_params, is_write, key, cfg, ev_base) conn:add_cmd('AUTH', { redis_params['username'], redis_params['password'] }) need_exec = true else - logger.errx('Redis requires a password when username is supplied') + logger.warnx('Redis requires a password when username is supplied') return false, nil, addr end elseif redis_params['password'] then diff --git a/src/libserver/redis_pool.cxx b/src/libserver/redis_pool.cxx index 34c09d055f..a74eafd48a 100644 --- a/src/libserver/redis_pool.cxx +++ b/src/libserver/redis_pool.cxx @@ -429,9 +429,7 @@ redis_pool_connection::redis_pool_connection(redis_pool *_pool, "AUTH %s %s", username.c_str(), password.c_str()); } else { - msg_err("Redis requires a password when username is supplied"); - redisAsyncFree(ctx); - return nullptr; + msg_warn("Redis requires a password when username is supplied"); } } else if (!password.empty()) { diff --git a/src/libstat/backends/redis_backend.c b/src/libstat/backends/redis_backend.c index 72ffd6c441..8d3f730aa8 100644 --- a/src/libstat/backends/redis_backend.c +++ b/src/libstat/backends/redis_backend.c @@ -369,9 +369,7 @@ rspamd_redis_maybe_auth(struct redis_stat_ctx *ctx, redisAsyncContext *redis) redisAsyncCommand(redis, NULL, NULL, "AUTH %s %s", ctx->username, ctx->password); } else { - msg_err("Redis requires a password when username is supplied"); - redisAsyncFree(ctx); - return NULL; + msg_warn("Redis requires a password when username is supplied"); } } else if (ctx->password) { diff --git a/src/libstat/learn_cache/redis_cache.c b/src/libstat/learn_cache/redis_cache.c index 0bbae8560e..0a378c8a3c 100644 --- a/src/libstat/learn_cache/redis_cache.c +++ b/src/libstat/learn_cache/redis_cache.c @@ -83,9 +83,7 @@ rspamd_redis_cache_maybe_auth(struct rspamd_redis_cache_ctx *ctx, redisAsyncCommand(redis, NULL, NULL, "AUTH %s %s", ctx->username, ctx->password); } else { - msg_err("Redis requires a password when username is supplied"); - redisAsyncFree(ctx); - return NULL; + msg_warn("Redis requires a password when username is supplied"); } } else if (ctx->password) { diff --git a/src/plugins/lua/bimi.lua b/src/plugins/lua/bimi.lua index 5053cc9410..2783590693 100644 --- a/src/plugins/lua/bimi.lua +++ b/src/plugins/lua/bimi.lua @@ -267,8 +267,7 @@ local function check_bimi_vmc(task, domain, record) if redis_params.password then password = string.format( '%s:%s@', redis_params.username, redis_params.password) else - rspamd_logger.errx(task, "Redis requires a password when username is supplied") - return + rspamd_logger.warnx(task, "Redis requires a password when username is supplied") end elseif redis_params.password then password = string.format(':%s@', redis_params.password)