Skip to content

validateaddress accepts hex string as input #2402

@brunoerg

Description

@brunoerg

By doing differential fuzzing between btcd and Bitcoin Core for address validation, we noticed that btcd accepts hex string as input in validateaddress RPC. Even if this is expected, I couldn't see any documentation about it?

 ./btcctl validateaddress "03319806666666666000000000000000000000000004067579826662920820cccc"
{
  "isvalid": true,
  "address": "16t7LdjXCmsrUed9VttNcTWSS32dyvUJHj",
  "isscript": false,
  "iswitness": false
}

Bitcoin Core:

./build/bin/bitcoin-cli validateaddress "03319806666666666000000000000000000000000004067579826662920820cccc"
{
  "isvalid": false,
  "error_locations": [
  ],
  "error": "Invalid checksum or length of Base58 address (P2PKH or P2SH)"
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions