Skip to content

Sanitize Input for Hidden Control Characters and Whitespace #271

Description

@codeZe-us

Copy-pasting addresses from block explorers or PDFs often introduces invisible Unicode characters, zero-width spaces, or carriage returns. This currently causes false-positive "invalid address" errors.

  • Add a preprocessing step to extractRouting that aggressively strips non-printable characters and trims whitespace from the destination string.
  • Log a SANITIZED_HIDDEN_CHARS info-level warning to inform developers of the modification.
  • Add test vectors featuring malicious/invisible Unicode characters.

Expectation: The kit is highly robust against messy user input, reducing user frustration when pasting addresses from varying operating systems and platforms.

Contributor telegram group: https://t.me/+OBaYnjDFA3w0Njdk

Metadata

Metadata

Assignees

Labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions