Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJieXu <xujie0739@gmail.com>2025-10-01 19:37:31 +0300
committerGitHub <noreply@github.com>2025-10-01 19:37:31 +0300
commit90c3529301e1528b91346a1493a079deb6cb80e7 (patch)
tree5b40fbeb1fdb1d44f58cb4427effcc0b2c13dd5f
parentb65ec83c397d366157631f257b2c93a543cf9d63 (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
-rw-r--r--x-ui.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/x-ui.sh b/x-ui.sh
index 643534a1..cadc71a1 100644
--- a/x-ui.sh
+++ b/x-ui.sh
@@ -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