Skip to content

Commit 2668617

Browse files
author
raza.ellahi
committed
fix bug in createclient
1 parent a8a2183 commit 2668617

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ client.acl(['deluser', 'someusername'], function (err, succ){
259259
if (succ) { console.log(succ) }
260260
});
261261
```
262-
Use other AC commands in the same format, for more ACL rules visit <a target='_blank' href='https://redis.io/topics/acl'>https://redis.io/topics/acl</a>
262+
Use other ACL commands in the same format, for more ACL rules visit <a target='_blank' href='https://redis.io/topics/acl'>https://redis.io/topics/acl</a>
263263

264264
In order to kill ACl client 'CLIENT KILL USER username', Closes all the connections that are authenticated with the specified ACL username, however it returns an error if the username does not map to an existing ACL user.
265265

lib/createClient.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,10 @@ module.exports = function createClient (port_arg, host_arg, options) {
2525
options = utils.clone(port_arg.url ? port_arg : host_arg || options);
2626
var url = port_arg.url || port_arg;
2727
var parsed = URL.parse(url, true, true);
28-
2928
// [redis:]//[[user][:password]@][host][:port][/db-number][?db=db-number[&password=bar[&option=value]]]
3029
if (parsed.slashes) { // We require slashes
3130
if (parsed.auth) {
32-
options.password = parsed.auth.slice(parsed.auth.indexOf(':') + 1);
31+
options.username = parsed.auth.slice(parsed.auth.indexOf(':') + 1);
3332
}
3433
if (parsed.protocol) {
3534
if (parsed.protocol === 'rediss:') {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "xredis",
3-
"version": "1.0.3",
3+
"version": "1.0.4",
44
"description": "A high performance Node.js Redis client with redis ACL functionalities",
55
"keywords": [
66
"database",

0 commit comments

Comments
 (0)