mirror of
https://github.com/CCLeonOS/LeonOS.git
synced 2026-03-03 15:17:01 +00:00
fix(installer): 使用"*"字符掩码隐藏管理员密码输入
在密码输入时添加提示信息并改用"*"字符作为掩码,提高安全性并明确提示用户输入将被隐藏
This commit is contained in:
@@ -99,7 +99,9 @@ while #admin_username == 0 do
|
||||
end
|
||||
|
||||
tu.coloredPrint("Enter admin password (leave empty for no password): ")
|
||||
local admin_password = read(nil, {}, nil, true) -- Use password mode
|
||||
-- Use password mask with "*" character
|
||||
tu.coloredPrint(colors.yellow, "(Password will be hidden)")
|
||||
local admin_password = read(nil, {}, nil, "*") -- Use password mode with "*" mask
|
||||
|
||||
-- Save user info
|
||||
settings.set("LeonOS.users.admin.username", admin_username)
|
||||
|
||||
Reference in New Issue
Block a user