Skip to content

Commit 678143e

Browse files
committed
dirty fix password protected folders
Signed-off-by: jkoberg <jkoberg@owncloud.com>
1 parent 150e096 commit 678143e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

internal/grpc/services/publicshareprovider/publicshareprovider.go

+2-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,7 @@ 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") {
319320
if err := s.passwordValidator.Validate(setPassword); err != nil {
320321
return &link.CreatePublicShareResponse{
321322
Status: status.NewInvalidArg(ctx, err.Error()),

0 commit comments

Comments
 (0)