HMAC calculation vs ids arrays

Shopify Partner
43 0 5

I am able to verify HMAC values, but not when there is an ids array parameter: ids[]. 

I am not even able to make this work when there is one member in the array. What is the correct 'concatenated' string for 

hmac=abcdef&ids%5B%5D=2477435783&protocol=https%3A%2F%2F&shop=skjolbergs-nfc-shop.myshopify.com&signature=123456&timestamp=1454616615

?

0 Likes
Highlighted
Tourist
11 0 1

Hi!

I'm having the exact same issue.
Any news on this?

/Fredrik

0 Likes
Highlighted
Shopify Partner
43 0 5

I contacted shopify per email and they were able to reproduce the problem. They are working on it.

0 Likes
Highlighted
Tourist
11 0 1

Thanks a lot for your reply!

I subscribed to this thread by email.
May I ask you to please post updates from shopify in this thread?
I would really like to know when this issue is solved.

Thanks in advance!

Kind Regards
Fredrik

 

0 Likes
Highlighted
Shopify Partner
43 0 5

Hi, the Shopify guys responded, and it seems to be working for me:

The nested query is parsed in such a way that `ids[]=1&ids[]=2` gets converted to `ids=["1", "2"]` before the signature is generated. 

The docs will be updated, probably shortly. 

Cheers!

0 Likes
Highlighted
Tourist
11 0 1

Thanks Thomas!

Kind Regards
Fredrik

0 Likes
Highlighted
Shopify Expert
43 1 8

For anyone else that stumbles upon this thread - thank you very much to Thomas for his insight. For folks like me who don't pay attention to detail - you MUST have a whitespace between ids. Thanks to Gavin at Disco Labs for his help in figuring this out.

ids=["12345", "23456"]

 

0 Likes