Skip to content

Descriptor parser incorrectly accepts whitespace within key #1297

@brunoerg

Description

@brunoerg

The descriptor parser is currently accepting descriptors that contain whitespace within key (I did not check if it's accepting whitespace for other fragments).

Example

The following descriptor is incorrectly accepted:

tr(0000000000000000000000000000000000000000000009223372036854 775807)

This descriptor contains a space character within the 32-byte hex-encoded public key, which should cause parsing to fail. The parser should reject this descriptor with an error indicating invalid key format or invalid hex encoding, since: 1. The x-only public key should be exactly 64 contiguous hex characters. 2. Allowing whitespace breaks descriptor canonicalization.

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