Skip to content

Commit

Permalink
[bug-OpenMage#721] OAuth parameters are not sorted as per the specs
Browse files Browse the repository at this point in the history
BREAKING CHANGE: existing OAuth applications may encounter some issues
leading to `invalid_signature` 401 errors from Magento due to the
removal of natural sorting for parameters when generating the signature
  • Loading branch information
real34 authored and edannenberg committed Aug 17, 2020
1 parent f50fd68 commit a2c509a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Zend/Oauth/Signature/SignatureAbstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ protected function _getBaseSignatureString(array $params, $method = null, $url =
protected function _toByteValueOrderedQueryString(array $params)
{
$return = array();
uksort($params, 'strnatcmp');
ksort($params);
foreach ($params as $key => $value) {
if (is_array($value)) {
natsort($value);
Expand Down

0 comments on commit a2c509a

Please sign in to comment.