Skip to content
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

阿里云 MNS API url query 不能进行编解码 #1

Open
iugo opened this issue Jul 6, 2023 · 0 comments
Open

阿里云 MNS API url query 不能进行编解码 #1

iugo opened this issue Jul 6, 2023 · 0 comments

Comments

@iugo
Copy link
Member

iugo commented Jul 6, 2023

在调试 DeleteMessage 的时候发现这一问题.

一般使用 URLSearchParams 进行 url query 的操作, 可是因为 DeleteMessage 中的 url query 可能存在需要编码的值, 所以就自动对其进行了编码.

可是编码后, 在 MNS API 返回的结果中报错, 说我们的 sign 不符. 然后我们强制取消了编码, 恢复正常.

可见, MNS API 不会对 url query 进行解码操作后再进行 sign 校验, 而是直接校验, 从而造成了问题.

URL 的规范见: https://url.spec.whatwg.org/#urlsearchparams

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant