Skip to content

Commit ee66d26

Browse files
committed
dirty fix password protected folders
Signed-off-by: jkoberg <[email protected]>
1 parent 150e096 commit ee66d26

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

internal/grpc/services/publicshareprovider/publicshareprovider.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import (
2424
"fmt"
2525
"regexp"
2626
"strconv"
27+
"strings"
2728
"time"
2829

2930
gateway "github.com/cs3org/go-cs3apis/cs3/gateway/v1beta1"
@@ -315,7 +316,10 @@ func (s *service) CreatePublicShare(ctx context.Context, req *link.CreatePublicS
315316
}
316317

317318
// validate password policy
318-
if len(setPassword) > 0 {
319+
if len(setPassword) > 0 && !strings.Contains(sRes.GetInfo().GetPath(), ".PasswordProtectedFolders") {
320+
fmt.Println("XXX MIMETYPE", sRes.GetInfo().GetMimeType())
321+
fmt.Println("XXX NAME", sRes.GetInfo().GetName())
322+
fmt.Println("XXX PATH", sRes.GetInfo().GetPath())
319323
if err := s.passwordValidator.Validate(setPassword); err != nil {
320324
return &link.CreatePublicShareResponse{
321325
Status: status.NewInvalidArg(ctx, err.Error()),

0 commit comments

Comments
 (0)