]> source.dussan.org Git - rspamd.git/commitdiff
changed errors to warnings.
authorlaodc <github@laodc.com>
Mon, 21 Aug 2023 09:29:28 +0000 (16:29 +0700)
committerlaodc <github@laodc.com>
Mon, 21 Aug 2023 09:29:28 +0000 (16:29 +0700)
nullptr on contructor was never meant to be there

lualib/lua_redis.lua
src/libserver/redis_pool.cxx
src/libstat/backends/redis_backend.c
src/libstat/learn_cache/redis_cache.c
src/plugins/lua/bimi.lua

index 377541f878f6f55ed669fb7444fb27a4b7d57f5c..8ae40da5bc39eecbdd245aabd642b3431161113a 100644 (file)
@@ -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
index 34c09d055f306bd49f388c4fd55bbbf9e1513133..a74eafd48a4ed5263fb12abf84aeeced7d040504 100644 (file)
@@ -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()) {
index 72ffd6c44152d43d401b976f737402f306e8ca94..8d3f730aa8f8196ad7cdab9ecaa542358d288a09 100644 (file)
@@ -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) {
index 0bbae8560e8f185a19908c020aa289ecea44a42b..0a378c8a3c649b3f86507201217c2f20013f1e69 100644 (file)
@@ -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) {
index 5053cc94108bcecd13696d4d0c7da1ecc4d7c28d..2783590693b7b295a01c3ae88a51d3fbe6992fa5 100644 (file)
@@ -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)