diff options
author | LaoDC <github@laodc.com> | 2023-08-21 22:02:20 +0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-21 22:02:20 +0700 |
commit | 6c3d5c7db86c2fe28d10915c2d6578efe5a4661c (patch) | |
tree | 92e8eb959c6aa5c806e4943d7999d2808fb3604b /lualib/rspamadm | |
parent | af29b508aeed0d74697e65aa9eae200fe9ffd903 (diff) | |
download | rspamd-6c3d5c7db86c2fe28d10915c2d6578efe5a4661c.tar.gz rspamd-6c3d5c7db86c2fe28d10915c2d6578efe5a4661c.zip |
Apply suggestions from code review
Co-authored-by: Vsevolod Stakhov <vsevolod@rspamd.com>
Diffstat (limited to 'lualib/rspamadm')
-rw-r--r-- | lualib/rspamadm/configwizard.lua | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lualib/rspamadm/configwizard.lua b/lualib/rspamadm/configwizard.lua index 7bcda5a01..fb8bd0d35 100644 --- a/lualib/rspamadm/configwizard.lua +++ b/lualib/rspamadm/configwizard.lua @@ -249,12 +249,12 @@ local function setup_redis(cfg, changes) redis_params['write_servers'] = ws end - if ask_yes_no('Do you have any username set for your Redis?') then - local usernm = readline_default("Enter Redis username:", nil) + if ask_yes_no('Do you have any username set for your Redis (ACL SETUSER and Redis 6.0+)') then + local username = readline_default("Enter Redis username:", nil) - if usernm then - changes.l['redis.conf']['username'] = usernm - redis_params['username'] = usernm + if username then + changes.l['redis.conf'].username = username + redis_params.username = username end local passwd = readline_default("Enter Redis password:", nil) |