Adds user parsing to redis-cli URIs (#8048)

This commit is contained in:
Itamar Haber 2020-11-12 19:19:18 +02:00 committed by GitHub
parent c170365dcf
commit 92ec592520
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -411,7 +411,7 @@ static void parseRedisUri(const char *uri) {
/* Extract user info. */
if ((userinfo = strchr(curr,'@'))) {
if ((username = strchr(curr, ':')) && username < userinfo) {
/* If provided, username is ignored. */
config.user = percentDecode(curr, username - curr);
curr = username + 1;
}