algorand / go-algorand-sdk

Algorand Golang SDK
https://pkg.go.dev/github.com/algorand/go-algorand-sdk/v2
MIT License
185 stars 95 forks source link

types: Reject non canonical addresses in DecodeAddress #595

Closed algochoi closed 1 year ago

algochoi commented 1 year ago

Checks that the address to decode is a canonical representation (least significant bit is 00, i.e. the ending character is one of "AEIMQUY4"). Adds a test to check that non-canonical addresses are rejected.

Note that the server (and most goal commands) will reject non-canonical addresses, but our SDK clients don't seem to check this.

Closes https://github.com/algorand/go-algorand-sdk/issues/274