Skip to content

Commit f8072ac

Browse files
committed
ACP2E-2969: REST API unable to make requests with slash (/) in SKU when using Oauth1
1 parent ca02555 commit f8072ac

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

lib/internal/Magento/Framework/Oauth/Helper/Utility.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
namespace Magento\Framework\Oauth\Helper;
99

1010
use Laminas\OAuth\Http\Utility as LaminasUtility;
11-
use Magento\Framework\Oauth\Helper\Signature\Hmac;
1211
use Magento\Framework\Oauth\Helper\Signature\HmacFactory;
1312

1413
class Utility
@@ -41,8 +40,12 @@ public function sign(
4140
?string $url = null
4241
): string {
4342
if ($this->isHmac256($signatureMethod)) {
44-
/** @var Hmac $hmac */
45-
$hmac = $this->hmacFactory->create(['consumerSecret' => $consumerSecret, 'tokenSecret' => $tokenSecret, 'hashAlgo' => 'sha256']);
43+
$hmac = $this->hmacFactory->create(
44+
['consumerSecret' => $consumerSecret,
45+
'tokenSecret' => $tokenSecret,
46+
'hashAlgo' => 'sha256'
47+
]
48+
);
4649

4750
return $hmac->sign($params, $method, $url);
4851
} else {

0 commit comments

Comments
 (0)