Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
92ec5925
Unverified
Commit
92ec5925
authored
Nov 12, 2020
by
Itamar Haber
Committed by
GitHub
Nov 12, 2020
Browse files
Adds user parsing to redis-cli URIs (#8048)
parent
c170365d
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/redis-cli.c
View file @
92ec5925
...
@@ -411,7 +411,7 @@ static void parseRedisUri(const char *uri) {
...
@@ -411,7 +411,7 @@ static void parseRedisUri(const char *uri) {
/* Extract user info. */
/* Extract user info. */
if
((
userinfo
=
strchr
(
curr
,
'@'
)))
{
if
((
userinfo
=
strchr
(
curr
,
'@'
)))
{
if
((
username
=
strchr
(
curr
,
':'
))
&&
username
<
userinfo
)
{
if
((
username
=
strchr
(
curr
,
':'
))
&&
username
<
userinfo
)
{
/* If provided, username is ignored. */
config
.
user
=
percentDecode
(
curr
,
username
-
curr
);
curr
=
username
+
1
;
curr
=
username
+
1
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment