diff --git a/go.mod b/go.mod index 7994cb5ccb9..63337d0c8ed 100644 --- a/go.mod +++ b/go.mod @@ -14,7 +14,7 @@ require ( github.com/coreos/go-oidc v2.2.1+incompatible github.com/coreos/go-oidc/v3 v3.6.0 github.com/cs3org/go-cs3apis v0.0.0-20230516150832-730ac860c71d - github.com/cs3org/reva/v2 v2.16.1-0.20230911153145-a2e2320f3448 + github.com/cs3org/reva/v2 v2.16.1-0.20230915081009-843fe781fbf8 github.com/disintegration/imaging v1.6.2 github.com/dutchcoders/go-clamd v0.0.0-20170520113014-b970184f4d9e github.com/egirna/icap-client v0.1.1 diff --git a/go.sum b/go.sum index 6d5fa32f182..81bd3cf8993 100644 --- a/go.sum +++ b/go.sum @@ -1017,6 +1017,8 @@ github.com/crewjam/saml v0.4.13 h1:TYHggH/hwP7eArqiXSJUvtOPNzQDyQ7vwmwEqlFWhMc= github.com/crewjam/saml v0.4.13/go.mod h1:igEejV+fihTIlHXYP8zOec3V5A8y3lws5bQBFsTm4gA= github.com/cs3org/reva/v2 v2.16.1-0.20230911153145-a2e2320f3448 h1:cQt0iMKURVZ6d0DhiNh9eqJ0WTQfPwDn29VArnJpwYg= github.com/cs3org/reva/v2 v2.16.1-0.20230911153145-a2e2320f3448/go.mod h1:RvhuweTFqzezjUFU0SIdTXakrEx9vJlMvQ7znPXSP1g= +github.com/cs3org/reva/v2 v2.16.1-0.20230915081009-843fe781fbf8 h1:7aj/OEZ6NbpB3nSKRJUlp2l0AT0j5tGP0nynLZS8UpU= +github.com/cs3org/reva/v2 v2.16.1-0.20230915081009-843fe781fbf8/go.mod h1:RvhuweTFqzezjUFU0SIdTXakrEx9vJlMvQ7znPXSP1g= github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= diff --git a/vendor/github.com/cs3org/reva/v2/internal/http/services/owncloud/ocs/data/capabilities.go b/vendor/github.com/cs3org/reva/v2/internal/http/services/owncloud/ocs/data/capabilities.go index a53ac679b91..27f24561666 100644 --- a/vendor/github.com/cs3org/reva/v2/internal/http/services/owncloud/ocs/data/capabilities.go +++ b/vendor/github.com/cs3org/reva/v2/internal/http/services/owncloud/ocs/data/capabilities.go @@ -50,14 +50,14 @@ type CapabilitiesData struct { // Capabilities groups several capability aspects type Capabilities struct { - Core *CapabilitiesCore `json:"core" xml:"core"` - Checksums *CapabilitiesChecksums `json:"checksums" xml:"checksums"` - Files *CapabilitiesFiles `json:"files" xml:"files" mapstructure:"files"` - Dav *CapabilitiesDav `json:"dav" xml:"dav"` - FilesSharing *CapabilitiesFilesSharing `json:"files_sharing" xml:"files_sharing" mapstructure:"files_sharing"` - Spaces *Spaces `json:"spaces,omitempty" xml:"spaces,omitempty" mapstructure:"spaces"` - Graph *CapabilitiesGraph `json:"graph,omitempty" xml:"graph,omitempty" mapstructure:"graph"` - PasswordPolicies *CapabilitiesPasswordPolicies `json:"password_policies,omitempty" xml:"password_policies,omitempty" mapstructure:"password_policies"` + Core *CapabilitiesCore `json:"core" xml:"core"` + Checksums *CapabilitiesChecksums `json:"checksums" xml:"checksums"` + Files *CapabilitiesFiles `json:"files" xml:"files" mapstructure:"files"` + Dav *CapabilitiesDav `json:"dav" xml:"dav"` + FilesSharing *CapabilitiesFilesSharing `json:"files_sharing" xml:"files_sharing" mapstructure:"files_sharing"` + Spaces *Spaces `json:"spaces,omitempty" xml:"spaces,omitempty" mapstructure:"spaces"` + Graph *CapabilitiesGraph `json:"graph,omitempty" xml:"graph,omitempty" mapstructure:"graph"` + PasswordPolicy *CapabilitiesPasswordPolicy `json:"password_policy,omitempty" xml:"password_policy,omitempty" mapstructure:"password_policy"` Notifications *CapabilitiesNotifications `json:"notifications,omitempty" xml:"notifications,omitempty"` } @@ -86,15 +86,14 @@ type CapabilitiesGraph struct { Users CapabilitiesGraphUsers `json:"users" xml:"users" mapstructure:"users"` } -// CapabilitiesPasswordPolicies hold the password policies capabilities -type CapabilitiesPasswordPolicies struct { - MinCharacters int `json:"min_characters" xml:"min_characters" mapstructure:"min_characters"` - MaxCharacters int `json:"max_characters" xml:"max_characters" mapstructure:"max_characters"` - MinLowerCaseCharacters int `json:"min_lowercase_characters" xml:"min_lowercase_characters" mapstructure:"min_lowercase_characters"` - MinUpperCaseCharacters int `json:"min_uppercase_characters" xml:"min_uppercase_characters" mapstructure:"min_uppercase_characters"` - MinDigits int `json:"min_digits" xml:"min_digits" mapstructure:"min_digits"` - MinSpecialCharacters int `json:"min_special_characters" xml:"min_special_characters" mapstructure:"min_special_characters"` - SpecialCharacters string `json:"special_characters" xml:"special_characters" mapstructure:"special_characters"` +// CapabilitiesPasswordPolicy hold the password policy capabilities +type CapabilitiesPasswordPolicy struct { + MinCharacters int `json:"min_characters" xml:"min_characters" mapstructure:"min_characters"` + MaxCharacters int `json:"max_characters" xml:"max_characters" mapstructure:"max_characters"` + MinLowerCaseCharacters int `json:"min_lowercase_characters" xml:"min_lowercase_characters" mapstructure:"min_lowercase_characters"` + MinUpperCaseCharacters int `json:"min_uppercase_characters" xml:"min_uppercase_characters" mapstructure:"min_uppercase_characters"` + MinDigits int `json:"min_digits" xml:"min_digits" mapstructure:"min_digits"` + MinSpecialCharacters int `json:"min_special_characters" xml:"min_special_characters" mapstructure:"min_special_characters"` } // CapabilitiesGraphUsers holds the graph user capabilities diff --git a/vendor/github.com/cs3org/reva/v2/internal/http/services/owncloud/ocs/handlers/apps/sharing/shares/shares.go b/vendor/github.com/cs3org/reva/v2/internal/http/services/owncloud/ocs/handlers/apps/sharing/shares/shares.go index ff239b649c0..28ed61adc77 100644 --- a/vendor/github.com/cs3org/reva/v2/internal/http/services/owncloud/ocs/handlers/apps/sharing/shares/shares.go +++ b/vendor/github.com/cs3org/reva/v2/internal/http/services/owncloud/ocs/handlers/apps/sharing/shares/shares.go @@ -1591,15 +1591,15 @@ func publicPwdEnforced(c *config.Config) passwordEnforced { } func passwordPolicies(c *config.Config) password.Validator { - if c.Capabilities.Capabilities == nil || c.Capabilities.Capabilities.PasswordPolicies == nil { - return password.NewPasswordPolicies(0, 0, 0, 0, 0) - } - return password.NewPasswordPolicies( - c.Capabilities.Capabilities.PasswordPolicies.MinCharacters, - c.Capabilities.Capabilities.PasswordPolicies.MinLowerCaseCharacters, - c.Capabilities.Capabilities.PasswordPolicies.MinUpperCaseCharacters, - c.Capabilities.Capabilities.PasswordPolicies.MinDigits, - c.Capabilities.Capabilities.PasswordPolicies.MinSpecialCharacters, + if c.Capabilities.Capabilities == nil || c.Capabilities.Capabilities.PasswordPolicy == nil { + return password.NewPasswordPolicy(0, 0, 0, 0, 0) + } + return password.NewPasswordPolicy( + c.Capabilities.Capabilities.PasswordPolicy.MinCharacters, + c.Capabilities.Capabilities.PasswordPolicy.MinLowerCaseCharacters, + c.Capabilities.Capabilities.PasswordPolicy.MinUpperCaseCharacters, + c.Capabilities.Capabilities.PasswordPolicy.MinDigits, + c.Capabilities.Capabilities.PasswordPolicy.MinSpecialCharacters, ) } diff --git a/vendor/github.com/cs3org/reva/v2/pkg/password/password_policies.go b/vendor/github.com/cs3org/reva/v2/pkg/password/password_policies.go index 9a499ba8ce7..4cada0b9d34 100644 --- a/vendor/github.com/cs3org/reva/v2/pkg/password/password_policies.go +++ b/vendor/github.com/cs3org/reva/v2/pkg/password/password_policies.go @@ -27,8 +27,8 @@ type Policies struct { specialCharactersRegexp *regexp.Regexp } -// NewPasswordPolicies returns a new NewPasswordPolicies instance -func NewPasswordPolicies(minCharacters, minLowerCaseCharacters, minUpperCaseCharacters, minDigits, minSpecialCharacters int) Validator { +// NewPasswordPolicy returns a new NewPasswordPolicy instance +func NewPasswordPolicy(minCharacters, minLowerCaseCharacters, minUpperCaseCharacters, minDigits, minSpecialCharacters int) Validator { p := &Policies{ minCharacters: minCharacters, minLowerCaseCharacters: minLowerCaseCharacters, diff --git a/vendor/modules.txt b/vendor/modules.txt index 26bae98c0b9..4d48b24484a 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -359,7 +359,7 @@ github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1 github.com/cs3org/go-cs3apis/cs3/storage/registry/v1beta1 github.com/cs3org/go-cs3apis/cs3/tx/v1beta1 github.com/cs3org/go-cs3apis/cs3/types/v1beta1 -# github.com/cs3org/reva/v2 v2.16.1-0.20230911153145-a2e2320f3448 +# github.com/cs3org/reva/v2 v2.16.1-0.20230915081009-843fe781fbf8 ## explicit; go 1.20 github.com/cs3org/reva/v2/cmd/revad/internal/grace github.com/cs3org/reva/v2/cmd/revad/runtime