diff --git a/lib/createClient.js b/lib/createClient.js index 133f0b758e..13c213470a 100644 --- a/lib/createClient.js +++ b/lib/createClient.js @@ -29,7 +29,7 @@ module.exports = function createClient (port_arg, host_arg, options) { // [redis:]//[[user][:password]@][host][:port][/db-number][?db=db-number[&password=bar[&option=value]]] if (parsed.slashes) { // We require slashes if (parsed.auth) { - options.password = parsed.auth.split(':')[1]; + options.password = parsed.auth.slice(parsed.auth.indexOf(':') + 1); } if (parsed.protocol) { if (parsed.protocol === 'rediss:') {