Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some important bugs in various files #2813

Merged
merged 1 commit into from
Dec 4, 2023

Conversation

DennisHeimbigner
Copy link
Collaborator

The most critical bug is in nch5s3comms.c.
I for some reason assumed that signing keys
did not contain any zero bytes. But obviously
it can, so some conditional code was removed.

Other fixes:

  1. Guarantee allocated memory is initialized to all zeros.
  2. Cleanup errmsg handling in libncpoco.
  3. Fix processing of aws list-objects-v2 because I misread the syntax.

The most critical bug is in nch5s3comms.c.
I for some reason assumed that signing keys
did not contain any zero bytes. But obviously
it can, so a test was removed.

Other fixes:
1. Guarantee allocated memory is initialized to all zeros.
2. Cleanup errmsg handling in libncpoco.
3. Fix processing of aws list-objects-v2 because I misread the syntax.
DennisHeimbigner added a commit to DennisHeimbigner/netcdf-c that referenced this pull request Dec 3, 2023
NOTE: it is important that this fix gets into 4.9.3

re: Issue Unidata#2798

## Modifications
* This PR includes PR Unidata#2813
* Support the following AWS environment variables in the internal S3 library
  (they are already supported by aws-sdk-cpp).
  - AWS_REGION
  - AWS_DEFAULT_REGION
  - AWS_ACCESS_KEY_ID
  - AWS_CONFIG_FILE
  - AWS_PROFILE
  - AWS_SECRET_ACCESS_KEY
  - (source https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html).
* Support an empty region when specifying s3.amazonaws.com as the host.
* Move some S3/AWS related functions to ds3util.c
* Add a test case to test empty region and AWS_[DEFAULT]_REGION.
@WardF WardF merged commit c2fd38d into Unidata:main Dec 4, 2023
97 checks passed
@DennisHeimbigner DennisHeimbigner deleted the fixes.dmh branch December 5, 2023 00:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants