Skip to content

fix(web): reject empty hex input in the auditor decoder #251

Description

@karagozemin

Problem

The web hex decoder treats an empty string or bare prefix as a valid empty byte array. In the auditor flow those values represent missing key or blob input and only fail later with a less useful cryptography error.

Task

Reject empty hex payloads with the existing invalid-hex error and add focused helper tests.

Acceptance criteria

  • Empty, whitespace-only, and prefix-only inputs are rejected.
  • Valid prefixed and unprefixed hex still decode correctly.
  • The helper tests are included in the normal web test command.
  • Web tests and typecheck pass.

Suggested implementation prompt

Add focused tests for the web hex helper, reject empty decoded payloads while preserving valid hex behavior, include the test in the web test command, and keep the change limited to this helper contract.

Activity

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

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardThird CampaignCampaign: Third Campaign

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions