diff options
| author | JieXu <xujie0739@gmail.com> | 2025-10-01 19:37:31 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-10-01 19:37:31 +0300 |
| commit | 90c3529301e1528b91346a1493a079deb6cb80e7 (patch) | |
| tree | 5b40fbeb1fdb1d44f58cb4427effcc0b2c13dd5f /x-ui.sh | |
| parent | b65ec83c397d366157631f257b2c93a543cf9d63 (diff) | |
[Security] Replace timestamp-based password generation with random generator (#3571)
* Update x-ui.sh
* Update x-ui.sh
* Update x-ui.sh
* Update x-ui.sh
Diffstat (limited to 'x-ui.sh')
| -rw-r--r-- | x-ui.sh | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -189,9 +189,9 @@ reset_user() { fi read -rp "Please set the login username [default is a random username]: " config_account - [[ -z $config_account ]] && config_account=$(date +%s%N | md5sum | cut -c 1-8) + [[ -z $config_account ]] && config_account=$(gen_random_string 10) read -rp "Please set the login password [default is a random password]: " config_password - [[ -z $config_password ]] && config_password=$(date +%s%N | md5sum | cut -c 1-8) + [[ -z $config_password ]] && config_password=$(gen_random_string 18) read -rp "Do you want to disable currently configured two-factor authentication? (y/n): " twoFactorConfirm if [[ $twoFactorConfirm != "y" && $twoFactorConfirm != "Y" ]]; then |
