-
Notifications
You must be signed in to change notification settings - Fork 690
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix signature error while the content includes @ #646
Conversation
xyq-c-cpp
commented
Dec 5, 2024
- fix Fix /sapi/v1/sub-account/universalTransfer Signature for this request is not valid. #639 , This is the fundamental approach to fix this issue. Fix issue [Signature error when request parameter content includes @]
- Currently, only the binance module has been repaired, and other modules have not been involved yet. Do not modify them for now.
Has the bug been confirmed? Is there a better way to fix it without hardcoding the special symbols? |
Yes, I have confirmed that the modified code has been tested in real time environment, for the interface |
The response appears to be @, which is a secure string and does not require URL encoding. @adshao |
OK, please add tests for this change and include comments explaining why the ‘@’ symbol must be escaped. |
'@' is a safe character, no need to escape. Supplementing this test is not effective, as how to handle this special character depends on the feedback from the Binance real disk interface. The actual test has been conducted, and if possible, you can also test and verify it. @adshao |
In actual testing, when passing in query_string, @ escape or no escape is acceptable. When passing in the body, @ escape is not allowed, @ not escape is allowed. So not escaping is the best solution. @adshao |
When parameters are passed through request-body, the main issue is that the signature is correct when the @ in the signature content is not escaped; Signature error if escaped. @adshao |