From 0b3c5f3e2b4c237d142b2d6ceb219b6a9f538c35 Mon Sep 17 00:00:00 2001 From: Noah Hsu Date: Sat, 13 Aug 2022 11:28:40 +0800 Subject: [PATCH] fix: random password of webdav guest user --- bootstrap/setting.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bootstrap/setting.go b/bootstrap/setting.go index 886748e15f5..027b12208ff 100644 --- a/bootstrap/setting.go +++ b/bootstrap/setting.go @@ -1,12 +1,13 @@ package bootstrap import ( + "strings" + "github.com/Xhofe/alist/conf" "github.com/Xhofe/alist/model" "github.com/Xhofe/alist/utils" log "github.com/sirupsen/logrus" "gorm.io/gorm" - "strings" ) func InitSettings() { @@ -235,7 +236,7 @@ func InitSettings() { }, { Key: "Visitor WebDAV password", - Value: "guest", + Value: utils.RandomStr(8), Description: "Visitor WebDAV password", Type: "string", Access: model.PRIVATE,