From 2cb39e9481ae75943322f79040b6d6ed1d227089 Mon Sep 17 00:00:00 2001 From: Samuel Lorch Date: Mon, 11 Aug 2025 15:36:01 +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