fix: requirepass allows connection with any non-empty password#3113
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
0eaab74 to
7083af7
Compare
7083af7 to
c9fd5aa
Compare
|
Hello 👋 This does not seem to be ported to the 4.0.2 branch. Is there a plan to do it? |
修复bug #3085 :解决requirepass是非空的但可通过任意密码连接
requirepass 为非空时填写任意字符串即可连接的原因
因为src/acl.cc文件中的Acl::InitLimitUser()函数的没有设置else分支,若 userpass 为空且requirepass不为空,limit 用户就会被设置为 nopass(免密),任何密码都能通过;若userpass 和 requirepass 都为空,所有用户都是管理员;若userpass 不为空且requirepass为空就会报(error) ERR Client sent AUTH, but no password is set的错误。
修改后的运行截图