From e0bf5937ce4b94518fed1ba9d866fa57cdfb2628 Mon Sep 17 00:00:00 2001 From: Samuel Lorch Date: Fri, 8 Aug 2025 16:53:59 +0200 Subject: [PATCH] Fix resource type password-string validation --- helper/secret.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/helper/secret.go b/helper/secret.go index 586ac26..502bfe7 100644 --- a/helper/secret.go +++ b/helper/secret.go @@ -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