Skip to content

bug(ack-id): controllerClaimSchema accepts empty id and controller strings #207

Description

@kutluhaneth46

Summary

controllerClaimSchema in both Valibot and Zod uses bare string() for id and controller. Empty strings pass structural validation even though controller credentials always carry DID URIs (createControllerCredential types both as DidUri).

That matches the empty-string hole recently addressed for ACK-Pay payment fields: identifiers that must be meaningful should reject blanks at the schema boundary.

Affected files

  • packages/ack-id/src/schemas/valibot.ts
  • packages/ack-id/src/schemas/zod.ts

Expected

{ id: \"\", controller: \"did:web:example.com\" } and the reverse should fail safeParse / safeParse in both venues.

Proposed fix

Require non-empty strings (or didUriSchema) for both fields in Valibot and Zod, with parity tests.

AI usage disclosure

Drafted with Cursor assistance; I reviewed the controller claim verifier and credential creator types before proposing this.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions