Skip to content

Commit

Permalink
[10.x] Fix: Prevent invalid AWS credentials options being created
Browse files Browse the repository at this point in the history
Improves on 909ea24597b86cfc7a49ce41074280d0347bf6a3 which could create credentials arrays with only a token
  • Loading branch information
robchett authored Nov 22, 2024
1 parent c66d570 commit bb0248b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions BusServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,10 @@ protected function registerBatchServices()
];

if (! empty($config['key']) && ! empty($config['secret'])) {
$dynamoConfig['credentials'] = Arr::only(
$config,
['key', 'secret', 'token']
);
$dynamoConfig['credentials'] = Arr::only($config, ['key', 'secret']);
if (! empty($config['token'])) {
$dynamoConfig['credentials']['token'] = $config['token'];
}
}

return new DynamoBatchRepository(
Expand Down

0 comments on commit bb0248b

Please sign in to comment.