diff options
author | Pavlo Yatsukhnenko <yatsukhnenko@gmail.com> | 2022-07-03 18:33:42 +0300 |
---|---|---|
committer | Pavlo Yatsukhnenko <yatsukhnenko@gmail.com> | 2022-07-03 18:33:42 +0300 |
commit | c28ad7bbd6c824cf92c671bad8c442d697d499bb (patch) | |
tree | e3104eee1a8218d8d05e395081572e2498b074d4 | |
parent | 982bd13b9fa7b001598f3583e9c38e969b023cf7 (diff) |
Issue #2122issue-2122
Allow IPv6 address within square brackets
-rw-r--r-- | library.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2340,7 +2340,7 @@ PHP_REDIS_API int redis_sock_connect(RedisSock *redis_sock) #ifdef HAVE_IPV6 /* If we've got IPv6 and find a colon in our address, convert to proper * IPv6 [host]:port format */ - if (strchr(address, ':') != NULL) { + if (strchr(address, ':') != NULL && strchr(address, '[') == NULL) { fmtstr = "%s://[%s]:%d"; } #endif |