summaryrefslogtreecommitdiff
path: root/src/modules/helloacl.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/helloacl.c')
-rw-r--r--src/modules/helloacl.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/modules/helloacl.c b/src/modules/helloacl.c
index 95dcb09c8..cf4819082 100644
--- a/src/modules/helloacl.c
+++ b/src/modules/helloacl.c
@@ -92,7 +92,11 @@ int AuthGlobalCommand_RedisCommand(RedisModuleCtx *ctx, RedisModuleString **argv
}
RedisModuleAuthCtx *auth_ctx = RedisModule_CreateAuthCtx(HelloACL_UserChanged, NULL);
- RedisModule_AuthClientWithUser(ctx, global, auth_ctx);
+ if (RedisModule_AuthClientWithUser(ctx, global, auth_ctx) ==
+ REDISMODULE_ERR) {
+ return RedisModule_ReplyWithError(ctx, "Couldn't authenticate client");
+ }
+
global_auth_ctx = auth_ctx;
return RedisModule_ReplyWithSimpleString(ctx, "OK");