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
54fd3d40
Unverified
Commit
54fd3d40
authored
Mar 28, 2021
by
Steve
Committed by
GitHub
Mar 29, 2021
Browse files
Fix redis-cli handling of rediss:// URL scheme (#8705)
parent
a79bb868
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/redis-cli.c
View file @
54fd3d40
...
@@ -406,15 +406,17 @@ static void parseRedisUri(const char *uri) {
...
@@ -406,15 +406,17 @@ static void parseRedisUri(const char *uri) {
if
(
!
strncasecmp
(
tlsscheme
,
curr
,
strlen
(
tlsscheme
)))
{
if
(
!
strncasecmp
(
tlsscheme
,
curr
,
strlen
(
tlsscheme
)))
{
#ifdef USE_OPENSSL
#ifdef USE_OPENSSL
config
.
tls
=
1
;
config
.
tls
=
1
;
curr
+=
strlen
(
tlsscheme
);
#else
#else
fprintf
(
stderr
,
"rediss:// is only supported when redis-cli is compiled with OpenSSL
\n
"
);
fprintf
(
stderr
,
"rediss:// is only supported when redis-cli is compiled with OpenSSL
\n
"
);
exit
(
1
);
exit
(
1
);
#endif
#endif
}
else
if
(
strncasecmp
(
scheme
,
curr
,
strlen
(
scheme
)))
{
}
else
if
(
!
strncasecmp
(
scheme
,
curr
,
strlen
(
scheme
)))
{
curr
+=
strlen
(
scheme
);
}
else
{
fprintf
(
stderr
,
"Invalid URI scheme
\n
"
);
fprintf
(
stderr
,
"Invalid URI scheme
\n
"
);
exit
(
1
);
exit
(
1
);
}
}
curr
+=
strlen
(
scheme
);
if
(
curr
==
end
)
return
;
if
(
curr
==
end
)
return
;
/* Extract user info. */
/* Extract user info. */
...
...
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