mirror of
https://github.com/stefanpejcic/openpanel
synced 2025-06-26 18:28:26 +00:00
Update install.sh
custom pw
This commit is contained in:
parent
7d338d727b
commit
92c647bca1
@ -1764,7 +1764,12 @@ create_admin_and_show_logins_success_message() {
|
||||
fi
|
||||
|
||||
if [ "$SET_ADMIN_PASSWORD" = true ]; then
|
||||
if [[ "$custom_password" =~ ^[A-Za-z0-9]{6,16}$ ]]; then
|
||||
new_password="${custom_password}"
|
||||
else
|
||||
echo "Warning: custom_password is invalid (must be alphanumeric and 6–16 characters). Generating a secure password."
|
||||
new_password=$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 16)
|
||||
fi
|
||||
else
|
||||
new_password=$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 16)
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user