Skip to content

Commit

Permalink
Merge pull request opencart#14056 from TheCartpenter/patch-118
Browse files Browse the repository at this point in the history
Upgraded aws/aws-sdk-php vendor to v3.316.5
  • Loading branch information
danielkerr authored Jul 23, 2024
2 parents 37a0177 + 0d9a18e commit dbb39e2
Show file tree
Hide file tree
Showing 23 changed files with 91 additions and 78 deletions.
12 changes: 6 additions & 6 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public function getQuote(array $address): array {
if ((string)$cost != '') {
$quote_data['weight_' . $result['geo_zone_id']] = [
'code' => 'weight.weight_' . $result['geo_zone_id'],
'name' => $result['name'] . ' (' . $this->language->get('text_weight') . ' ' . $this->weight->format($weight, $this->config->get('config_weight_class_id')) . ')',
'name' => $result['name'] . ' (' . $this->language->get('text_weight') . ' ' . $this->weight->format($weight, $this->config->get('config_weight_class_id')) . ')',
'cost' => $cost,
'tax_class_id' => $this->config->get('shipping_weight_tax_class_id'),
'text' => $this->currency->format($this->tax->calculate((float)$cost, $this->config->get('shipping_weight_tax_class_id'), $this->config->get('config_tax')), $this->session->data['currency'])
Expand Down
25 changes: 24 additions & 1 deletion upload/system/storage/vendor/aws/aws-sdk-php/src/AwsClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ class AwsClient implements AwsClientInterface
/** @var string */
private $region;

/** @var string */
private $signingRegionSet;

/** @var string */
private $endpoint;

Expand Down Expand Up @@ -240,6 +243,7 @@ public function __construct(array $args)
$this->credentialProvider = $config['credentials'];
$this->tokenProvider = $config['token'];
$this->region = $config['region'] ?? null;
$this->signingRegionSet = $config['sigv4a_signing_region_set'] ?? null;
$this->config = $config['config'];
$this->setClientBuiltIns($args);
$this->clientContextParams = $this->setClientContextParams($args);
Expand Down Expand Up @@ -422,6 +426,7 @@ private function addSignatureMiddleware(array $args)
$signatureVersion = $this->config['signature_version'];
$name = $this->config['signing_name'];
$region = $this->config['signing_region'];
$signingRegionSet = $this->signingRegionSet;

if (isset($args['signature_version'])
|| isset($this->config['configured_signature_version'])
Expand All @@ -433,7 +438,15 @@ private function addSignatureMiddleware(array $args)

$resolver = static function (
CommandInterface $c
) use ($api, $provider, $name, $region, $signatureVersion, $configuredSignatureVersion) {
) use (
$api,
$provider,
$name,
$region,
$signatureVersion,
$configuredSignatureVersion,
$signingRegionSet
) {
if (!$configuredSignatureVersion) {
if (!empty($c['@context']['signing_region'])) {
$region = $c['@context']['signing_region'];
Expand All @@ -459,6 +472,16 @@ private function addSignatureMiddleware(array $args)
}
}

if ($signatureVersion === 'v4a') {
$commandSigningRegionSet = !empty($c['@context']['signing_region_set'])
? implode(', ', $c['@context']['signing_region_set'])
: null;

$region = $signingRegionSet
?? $commandSigningRegionSet
?? $region;
}

return SignatureProvider::resolve($provider, $signatureVersion, $name, $region);
};
$this->handlerList->appendSign(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,13 @@ class ClientResolver
'doc' => 'Set to false to disable checking for shared aws config files usually located in \'~/.aws/config\' and \'~/.aws/credentials\'. This will be ignored if you set the \'profile\' setting.',
'default' => true,
],
'sigv4a_signing_region_set' => [
'type' => 'value',
'valid' => ['array', 'string'],
'doc' => 'A comma-delimited list of supported regions sent in sigv4a requests.',
'fn' => [__CLASS__, '_apply_sigv4a_signing_region_set'],
'default' => [__CLASS__, '_default_sigv4a_signing_region_set']
]
];

/**
Expand Down Expand Up @@ -1240,6 +1247,26 @@ public static function _default_endpoint(array &$args)
return $value;
}

public static function _apply_sigv4a_signing_region_set($value, array &$args)
{
if (empty($value)) {
$args['sigv4a_signing_region_set'] = null;
} elseif (is_array($value)) {
$args['sigv4a_signing_region_set'] = implode(', ', $value);
} else {
$args['sigv4a_signing_region_set'] = $value;
}
}

public static function _default_sigv4a_signing_region_set(array &$args)
{
return ConfigurationResolver::resolve(
'sigv4a_signing_region_set',
'',
'string'
);
}

public static function _apply_region($value, array &$args)
{
if (empty($value)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
* @method \GuzzleHttp\Promise\Promise cancelSubscriptionAsync(array $args = [])
* @method \Aws\Result createAsset(array $args = [])
* @method \GuzzleHttp\Promise\Promise createAssetAsync(array $args = [])
* @method \Aws\Result createAssetFilter(array $args = [])
* @method \GuzzleHttp\Promise\Promise createAssetFilterAsync(array $args = [])
* @method \Aws\Result createAssetRevision(array $args = [])
* @method \GuzzleHttp\Promise\Promise createAssetRevisionAsync(array $args = [])
* @method \Aws\Result createAssetType(array $args = [])
Expand Down Expand Up @@ -55,6 +57,8 @@
* @method \GuzzleHttp\Promise\Promise createUserProfileAsync(array $args = [])
* @method \Aws\Result deleteAsset(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteAssetAsync(array $args = [])
* @method \Aws\Result deleteAssetFilter(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteAssetFilterAsync(array $args = [])
* @method \Aws\Result deleteAssetType(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteAssetTypeAsync(array $args = [])
* @method \Aws\Result deleteDataSource(array $args = [])
Expand Down Expand Up @@ -93,6 +97,8 @@
* @method \GuzzleHttp\Promise\Promise disassociateEnvironmentRoleAsync(array $args = [])
* @method \Aws\Result getAsset(array $args = [])
* @method \GuzzleHttp\Promise\Promise getAssetAsync(array $args = [])
* @method \Aws\Result getAssetFilter(array $args = [])
* @method \GuzzleHttp\Promise\Promise getAssetFilterAsync(array $args = [])
* @method \Aws\Result getAssetType(array $args = [])
* @method \GuzzleHttp\Promise\Promise getAssetTypeAsync(array $args = [])
* @method \Aws\Result getDataSource(array $args = [])
Expand Down Expand Up @@ -141,6 +147,8 @@
* @method \GuzzleHttp\Promise\Promise getTimeSeriesDataPointAsync(array $args = [])
* @method \Aws\Result getUserProfile(array $args = [])
* @method \GuzzleHttp\Promise\Promise getUserProfileAsync(array $args = [])
* @method \Aws\Result listAssetFilters(array $args = [])
* @method \GuzzleHttp\Promise\Promise listAssetFiltersAsync(array $args = [])
* @method \Aws\Result listAssetRevisions(array $args = [])
* @method \GuzzleHttp\Promise\Promise listAssetRevisionsAsync(array $args = [])
* @method \Aws\Result listDataSourceRunActivities(array $args = [])
Expand Down Expand Up @@ -213,6 +221,8 @@
* @method \GuzzleHttp\Promise\Promise tagResourceAsync(array $args = [])
* @method \Aws\Result untagResource(array $args = [])
* @method \GuzzleHttp\Promise\Promise untagResourceAsync(array $args = [])
* @method \Aws\Result updateAssetFilter(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateAssetFilterAsync(array $args = [])
* @method \Aws\Result updateDataSource(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateDataSourceAsync(array $args = [])
* @method \Aws\Result updateDomain(array $args = [])
Expand Down

This file was deleted.

This file was deleted.

4 changes: 1 addition & 3 deletions upload/system/storage/vendor/aws/aws-sdk-php/src/Sdk.php
Original file line number Diff line number Diff line change
Expand Up @@ -496,8 +496,6 @@
* @method \Aws\MultiRegionClient createMultiRegionMigrationHubRefactorSpaces(array $args = [])
* @method \Aws\MigrationHubStrategyRecommendations\MigrationHubStrategyRecommendationsClient createMigrationHubStrategyRecommendations(array $args = [])
* @method \Aws\MultiRegionClient createMultiRegionMigrationHubStrategyRecommendations(array $args = [])
* @method \Aws\Mobile\MobileClient createMobile(array $args = [])
* @method \Aws\MultiRegionClient createMultiRegionMobile(array $args = [])
* @method \Aws\Neptune\NeptuneClient createNeptune(array $args = [])
* @method \Aws\MultiRegionClient createMultiRegionNeptune(array $args = [])
* @method \Aws\NeptuneGraph\NeptuneGraphClient createNeptuneGraph(array $args = [])
Expand Down Expand Up @@ -777,7 +775,7 @@
*/
class Sdk
{
const VERSION = '3.316.4';
const VERSION = '3.316.5';

/** @var array Arguments for creating clients */
private $args;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ protected function signWithV4a(
'signature_type' => SignatureType::HTTP_REQUEST_HEADERS,
'credentials_provider' => $credentials_provider,
'signed_body_value' => $this->getPayload($request),
'region' => "*",
'region' => $this->region,
'should_normalize_uri_path' => false,
'use_double_uri_encode' => false,
'service' => $signingService,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ protected function signWithV4a(
'signed_body_value' => $this->getPayload($request),
'should_normalize_uri_path' => true,
'use_double_uri_encode' => true,
'region' => "*",
'region' => $this->region,
'service' => $signingService,
'date' => time(),
]);
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<?php
// This file was auto-generated from sdk-root/src/data/datazone/2018-05-10/paginators-1.json
return [ 'pagination' => [ 'ListAssetRevisions' => [ 'input_token' => 'nextToken', 'output_token' => 'nextToken', 'limit_key' => 'maxResults', 'result_key' => 'items', ], 'ListDataSourceRunActivities' => [ 'input_token' => 'nextToken', 'output_token' => 'nextToken', 'limit_key' => 'maxResults', 'result_key' => 'items', ], 'ListDataSourceRuns' => [ 'input_token' => 'nextToken', 'output_token' => 'nextToken', 'limit_key' => 'maxResults', 'result_key' => 'items', ], 'ListDataSources' => [ 'input_token' => 'nextToken', 'output_token' => 'nextToken', 'limit_key' => 'maxResults', 'result_key' => 'items', ], 'ListDomains' => [ 'input_token' => 'nextToken', 'output_token' => 'nextToken', 'limit_key' => 'maxResults', 'result_key' => 'items', ], 'ListEnvironmentActions' => [ 'input_token' => 'nextToken', 'output_token' => 'nextToken', 'limit_key' => 'maxResults', 'result_key' => 'items', ], 'ListEnvironmentBlueprintConfigurations' => [ 'input_token' => 'nextToken', 'output_token' => 'nextToken', 'limit_key' => 'maxResults', 'result_key' => 'items', ], 'ListEnvironmentBlueprints' => [ 'input_token' => 'nextToken', 'output_token' => 'nextToken', 'limit_key' => 'maxResults', 'result_key' => 'items', ], 'ListEnvironmentProfiles' => [ 'input_token' => 'nextToken', 'output_token' => 'nextToken', 'limit_key' => 'maxResults', 'result_key' => 'items', ], 'ListEnvironments' => [ 'input_token' => 'nextToken', 'output_token' => 'nextToken', 'limit_key' => 'maxResults', 'result_key' => 'items', ], 'ListLineageNodeHistory' => [ 'input_token' => 'nextToken', 'output_token' => 'nextToken', 'limit_key' => 'maxResults', 'result_key' => 'nodes', ], 'ListMetadataGenerationRuns' => [ 'input_token' => 'nextToken', 'output_token' => 'nextToken', 'limit_key' => 'maxResults', 'result_key' => 'items', ], 'ListNotifications' => [ 'input_token' => 'nextToken', 'output_token' => 'nextToken', 'limit_key' => 'maxResults', 'result_key' => 'notifications', ], 'ListProjectMemberships' => [ 'input_token' => 'nextToken', 'output_token' => 'nextToken', 'limit_key' => 'maxResults', 'result_key' => 'members', ], 'ListProjects' => [ 'input_token' => 'nextToken', 'output_token' => 'nextToken', 'limit_key' => 'maxResults', 'result_key' => 'items', ], 'ListSubscriptionGrants' => [ 'input_token' => 'nextToken', 'output_token' => 'nextToken', 'limit_key' => 'maxResults', 'result_key' => 'items', ], 'ListSubscriptionRequests' => [ 'input_token' => 'nextToken', 'output_token' => 'nextToken', 'limit_key' => 'maxResults', 'result_key' => 'items', ], 'ListSubscriptionTargets' => [ 'input_token' => 'nextToken', 'output_token' => 'nextToken', 'limit_key' => 'maxResults', 'result_key' => 'items', ], 'ListSubscriptions' => [ 'input_token' => 'nextToken', 'output_token' => 'nextToken', 'limit_key' => 'maxResults', 'result_key' => 'items', ], 'ListTimeSeriesDataPoints' => [ 'input_token' => 'nextToken', 'output_token' => 'nextToken', 'limit_key' => 'maxResults', 'result_key' => 'items', ], 'Search' => [ 'input_token' => 'nextToken', 'output_token' => 'nextToken', 'limit_key' => 'maxResults', 'result_key' => 'items', ], 'SearchGroupProfiles' => [ 'input_token' => 'nextToken', 'output_token' => 'nextToken', 'limit_key' => 'maxResults', 'result_key' => 'items', ], 'SearchListings' => [ 'input_token' => 'nextToken', 'output_token' => 'nextToken', 'limit_key' => 'maxResults', 'result_key' => 'items', ], 'SearchTypes' => [ 'input_token' => 'nextToken', 'output_token' => 'nextToken', 'limit_key' => 'maxResults', 'result_key' => 'items', ], 'SearchUserProfiles' => [ 'input_token' => 'nextToken', 'output_token' => 'nextToken', 'limit_key' => 'maxResults', 'result_key' => 'items', ], ],];
return [ 'pagination' => [ 'ListAssetFilters' => [ 'input_token' => 'nextToken', 'output_token' => 'nextToken', 'limit_key' => 'maxResults', 'result_key' => 'items', ], 'ListAssetRevisions' => [ 'input_token' => 'nextToken', 'output_token' => 'nextToken', 'limit_key' => 'maxResults', 'result_key' => 'items', ], 'ListDataSourceRunActivities' => [ 'input_token' => 'nextToken', 'output_token' => 'nextToken', 'limit_key' => 'maxResults', 'result_key' => 'items', ], 'ListDataSourceRuns' => [ 'input_token' => 'nextToken', 'output_token' => 'nextToken', 'limit_key' => 'maxResults', 'result_key' => 'items', ], 'ListDataSources' => [ 'input_token' => 'nextToken', 'output_token' => 'nextToken', 'limit_key' => 'maxResults', 'result_key' => 'items', ], 'ListDomains' => [ 'input_token' => 'nextToken', 'output_token' => 'nextToken', 'limit_key' => 'maxResults', 'result_key' => 'items', ], 'ListEnvironmentActions' => [ 'input_token' => 'nextToken', 'output_token' => 'nextToken', 'limit_key' => 'maxResults', 'result_key' => 'items', ], 'ListEnvironmentBlueprintConfigurations' => [ 'input_token' => 'nextToken', 'output_token' => 'nextToken', 'limit_key' => 'maxResults', 'result_key' => 'items', ], 'ListEnvironmentBlueprints' => [ 'input_token' => 'nextToken', 'output_token' => 'nextToken', 'limit_key' => 'maxResults', 'result_key' => 'items', ], 'ListEnvironmentProfiles' => [ 'input_token' => 'nextToken', 'output_token' => 'nextToken', 'limit_key' => 'maxResults', 'result_key' => 'items', ], 'ListEnvironments' => [ 'input_token' => 'nextToken', 'output_token' => 'nextToken', 'limit_key' => 'maxResults', 'result_key' => 'items', ], 'ListLineageNodeHistory' => [ 'input_token' => 'nextToken', 'output_token' => 'nextToken', 'limit_key' => 'maxResults', 'result_key' => 'nodes', ], 'ListMetadataGenerationRuns' => [ 'input_token' => 'nextToken', 'output_token' => 'nextToken', 'limit_key' => 'maxResults', 'result_key' => 'items', ], 'ListNotifications' => [ 'input_token' => 'nextToken', 'output_token' => 'nextToken', 'limit_key' => 'maxResults', 'result_key' => 'notifications', ], 'ListProjectMemberships' => [ 'input_token' => 'nextToken', 'output_token' => 'nextToken', 'limit_key' => 'maxResults', 'result_key' => 'members', ], 'ListProjects' => [ 'input_token' => 'nextToken', 'output_token' => 'nextToken', 'limit_key' => 'maxResults', 'result_key' => 'items', ], 'ListSubscriptionGrants' => [ 'input_token' => 'nextToken', 'output_token' => 'nextToken', 'limit_key' => 'maxResults', 'result_key' => 'items', ], 'ListSubscriptionRequests' => [ 'input_token' => 'nextToken', 'output_token' => 'nextToken', 'limit_key' => 'maxResults', 'result_key' => 'items', ], 'ListSubscriptionTargets' => [ 'input_token' => 'nextToken', 'output_token' => 'nextToken', 'limit_key' => 'maxResults', 'result_key' => 'items', ], 'ListSubscriptions' => [ 'input_token' => 'nextToken', 'output_token' => 'nextToken', 'limit_key' => 'maxResults', 'result_key' => 'items', ], 'ListTimeSeriesDataPoints' => [ 'input_token' => 'nextToken', 'output_token' => 'nextToken', 'limit_key' => 'maxResults', 'result_key' => 'items', ], 'Search' => [ 'input_token' => 'nextToken', 'output_token' => 'nextToken', 'limit_key' => 'maxResults', 'result_key' => 'items', ], 'SearchGroupProfiles' => [ 'input_token' => 'nextToken', 'output_token' => 'nextToken', 'limit_key' => 'maxResults', 'result_key' => 'items', ], 'SearchListings' => [ 'input_token' => 'nextToken', 'output_token' => 'nextToken', 'limit_key' => 'maxResults', 'result_key' => 'items', ], 'SearchTypes' => [ 'input_token' => 'nextToken', 'output_token' => 'nextToken', 'limit_key' => 'maxResults', 'result_key' => 'items', ], 'SearchUserProfiles' => [ 'input_token' => 'nextToken', 'output_token' => 'nextToken', 'limit_key' => 'maxResults', 'result_key' => 'items', ], ],];

Large diffs are not rendered by default.

Loading

0 comments on commit dbb39e2

Please sign in to comment.