Skip to content

decodeStealthMetaAddress accepts non-hex characters in the payload #232

Description

@Jerryvic911

Found while writing tests for the rescue tool (wraith-protocol/contracts#199).

On develop, decodeStealthMetaAddress('st:xlm:' + 'zz'.repeat(64)) does not throw, even though the payload is not hex. The prefix and length checks pass, and the decoder returns keys instead of an InvalidMetaAddressError.

Expected: a payload containing non-hex characters is rejected with InvalidMetaAddressError. A strict check such as /^[0-9a-fA-F]{128}$/ on the payload would do it.

Workaround: the rescue tool validates the format with a regex before calling the decoder.

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