fix: random password of webdav guest user

This commit is contained in:
Noah Hsu
2022-08-13 11:28:40 +08:00
parent cc74effd30
commit 0b3c5f3e2b

View File

@@ -1,12 +1,13 @@
package bootstrap package bootstrap
import ( import (
"strings"
"github.com/Xhofe/alist/conf" "github.com/Xhofe/alist/conf"
"github.com/Xhofe/alist/model" "github.com/Xhofe/alist/model"
"github.com/Xhofe/alist/utils" "github.com/Xhofe/alist/utils"
log "github.com/sirupsen/logrus" log "github.com/sirupsen/logrus"
"gorm.io/gorm" "gorm.io/gorm"
"strings"
) )
func InitSettings() { func InitSettings() {
@@ -235,7 +236,7 @@ func InitSettings() {
}, },
{ {
Key: "Visitor WebDAV password", Key: "Visitor WebDAV password",
Value: "guest", Value: utils.RandomStr(8),
Description: "Visitor WebDAV password", Description: "Visitor WebDAV password",
Type: "string", Type: "string",
Access: model.PRIVATE, Access: model.PRIVATE,