From 320459873fb47dbbe9f96398361f92f874c50b75 Mon Sep 17 00:00:00 2001 From: Clarence Date: Thu, 6 May 2021 11:31:45 +0800 Subject: [PATCH] Fix redis connect failed when there are "@" in redis password. --- daemon/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daemon/main.c b/daemon/main.c index 42c3f42e4..fd3ba17f8 100644 --- a/daemon/main.c +++ b/daemon/main.c @@ -334,7 +334,7 @@ static int redis_ep_parse(endpoint_t *ep, int *db, char **auth, const char *auth char *sl; long l; - sl = strchr(str, '@'); + sl = strrchr(str, '@'); if (sl) { *sl = 0; *auth = g_strdup(str);