|
|
@ -4,6 +4,7 @@ import (
|
|
|
|
"context"
|
|
|
|
"context"
|
|
|
|
"encoding/gob"
|
|
|
|
"encoding/gob"
|
|
|
|
"fmt"
|
|
|
|
"fmt"
|
|
|
|
|
|
|
|
"strings"
|
|
|
|
"time"
|
|
|
|
"time"
|
|
|
|
|
|
|
|
|
|
|
|
"github.com/cloudreve/Cloudreve/v4/application/constants"
|
|
|
|
"github.com/cloudreve/Cloudreve/v4/application/constants"
|
|
|
@ -260,7 +261,7 @@ func (l *manager) CreateOrUpdateShare(ctx context.Context, path *fs.URI, args *C
|
|
|
|
password := ""
|
|
|
|
password := ""
|
|
|
|
if args.IsPrivate {
|
|
|
|
if args.IsPrivate {
|
|
|
|
password = args.Password
|
|
|
|
password = args.Password
|
|
|
|
if password == "" {
|
|
|
|
if strings.TrimSpace(password) == "" {
|
|
|
|
password = util.RandString(8, util.RandomLowerCases)
|
|
|
|
password = util.RandString(8, util.RandomLowerCases)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|