dfinity / exchange-rate-canister

The exchange rate canister (XRC) makes use of the HTTP requests feature to provide exchange rates as a service to the IC.
Apache License 2.0
37 stars 10 forks source link

`feat`: Adds additional validation for incoming request's asset symbols. #202

Closed dfinity-ryancroote closed 1 year ago

dfinity-ryancroote commented 1 year ago

This PR adds validation for the symbols. If the symbols contain invalid symbols, the sanitize function clears the field. The validation picks up on the empty strings and causes an error to be returned. This is added to prevent calls to the exchanges for invalid symbols.