jaggedsoft / node-binance-api

Node Binance API is an asynchronous node.js library for the Binance API designed to be easy to use.
MIT License
1.58k stars 767 forks source link

Fix signature error with email in params #862 #863

Open koders opened 1 year ago

koders commented 1 year ago

There is an issue with signature creation for requests involving emails (subaccount requests).

The query params are encoded and then the signature is created from encoded query, but for the signature to be correct, it has to be created on decoded query, and encoded after signature is created.

email=xxx%40xxx.com this is encoded, and therefore creates wrong signature, so we need to decode it, when creating the signature.

I encountered this only for emails in params, but could also happen in other cases

Issue #862