Open dmitrii-fediuk opened 4 years ago
It seems that Hubshoply incorrectly generates an OAuth signature for a product request. At the same time, Hubshoply correctly generates the signature for an order request. The correct order request is simple:
/api/rest/orders/1
The incorrect product request is more complex:https://m1.hubshoply.mage2.pro/api/rest/products?filter%5B1%5D%5Battribute%5D=sku&filter%5B1%5D%5Beq%5D=Saint+Laurent+Betty-beige-36
The Magento's code to verify the signature is: https://github.com/OpenMage/magento-mirror/blob/1.9.4.5/app/code/core/Mage/Oauth/Model/Server.php#L538-L547 https://github.com/OpenMage/magento-mirror/blob/1.9.4.5/lib/Zend/Oauth/Signature/Hmac.php#L44-L53
The parameters used by Magento to verify the order and product request signatures are shown on the product.png and order.png screenshot (I made then in a PHP debugger).
I guess that the OAuth client library used by Hubshoply incorrectly processes the
?filter%5B1%5D%5Battribute%5D=sku&filter%5B1%5D%5Beq%5D=Saint+Laurent+Betty-beige-36
part and generates a wrong OAuth signature.
I think the Hubshoply's OAuth client incorrecly calculates the OAuth signature when the request URL contains some special characters. The problem is described here: magento.stackexchange.com/questions/62873 In my case the problem URL is
https://m1.hubshoply.mage2.pro/api/rest/products?filter%5B1%5D%5Battribute%5D=sku&filter%5B1%5D%5Beq%5D=Saint+Laurent+Betty-beige-36
upwork.com/messages/rooms/room_b72ba12d343219fd302517aa34ee4d7b/story_408cad113d7d5f6b7ffc3d0715a76e94