mirror of
https://github.com/passbolt/go-passbolt.git
synced 2025-09-13 06:19:08 +00:00
Fix resource type password-string validation
This commit is contained in:
parent
3cd88d7553
commit
e0bf5937ce
1 changed files with 9 additions and 0 deletions
|
@ -11,6 +11,15 @@ import (
|
|||
)
|
||||
|
||||
func validateSecretData(rType *api.ResourceType, secretData string) error {
|
||||
// TODO Remove when v4 Resources are unsupported
|
||||
// with the Resource Type password-string the Secret is not json and can't be properly validated, so skip the check here
|
||||
if rType.Slug == "password-string" {
|
||||
if len(secretData) > 4096 {
|
||||
return fmt.Errorf("password is longer than 4096")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var schemaDefinition api.ResourceTypeSchema
|
||||
definition := rType.Definition
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue