-
Notifications
You must be signed in to change notification settings - Fork 472
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow default username and fix case sensitive check in HELLO #1406
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for your contribution!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! One comment to convey the background discussion into code.
src/commands/cmd_server.cc
Outdated
@@ -657,7 +657,7 @@ class CommandTime : public Commander { | |||
} | |||
}; | |||
|
|||
/* HELLO [<protocol-version> [AUTH <password>] [SETNAME <name>] ] */ | |||
/* HELLO [<protocol-version> [AUTH [<password>|<username> <password>]] [SETNAME <name>] ] */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps add a comment that username
should be always default
otherwise it fails. And such syntax is for compatible only.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure!
…check with HELLO options Signed-off-by: Rueian <rueiancsie@gmail.com>
d1d6507
0399a1f
to
d1d6507
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Merging. Thanks for your contribution. |
Seems that only "hello" support authenticate with user, should https://redis.io/commands/auth/ support that? |
I think it is not urgent as HELLO, since HELLO in redis just does not allow the username to be omitted, but |
Ok, reasonable. LGTM! |
Hi, following the conversation #1403
This PR makes the
HELLO
command:default
username as well.AUTH
andSETNAME
. Clients may send these options in lower or upper cases. For example, go-redis sends them in lower cases.I think this PR won't break any existing Kvrocks clients but will remove barriers for other clients to adapt Kvrocks by aligning HELLO syntax with Redis.
Please let me know if these changes make sense.