mirror of
https://github.com/filebrowser/filebrowser.git
synced 2026-01-23 02:35:10 +00:00
fix: generate random admin password on quick setup
This should help mitigate issues like #3646
This commit is contained in:
parent
1d14798653
commit
a46acba5f9
2 changed files with 23 additions and 1 deletions
|
|
@ -378,7 +378,12 @@ func quickSetup(flags *pflag.FlagSet, d pythonData) {
|
|||
password := getParam(flags, "password")
|
||||
|
||||
if password == "" {
|
||||
password, err = users.HashPwd("admin")
|
||||
pwd, err := users.RandomPwd()
|
||||
checkErr(err)
|
||||
|
||||
log.Println("Generated random admin password for quick setup:", pwd)
|
||||
|
||||
password, err = users.HashPwd(pwd)
|
||||
checkErr(err)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue