Issue summary
Before opening this issue, I have:
When a query parameter value contains spaces, the query string generated by JavaScript's new URLSearchParams(...) in the Shopify SDK uses an encoding that doesn't match what Shopify's signature/verification expects, causing the HMAC verification to fail.
Expected behavior
validated by api.utils.validateHmac(query) work.
Actual behavior
not work. I'm a bit confused — how exactly should the HMAC check be performed here? After reading the code of api.utils.validateHmac, I tried a version that doesn't encode spaces, and the HMAC verification passed.
Steps to reproduce the problem
- Open [Shopify App Store], find any App.
- add some params with escapes at query.
- click
Install
- copy the searchParams, try validate it.