Skip to content

Commit

Permalink
Add the ability to handle no credentials.
Browse files Browse the repository at this point in the history
Signature v4 requests were trying to create authorisation strings when no credentials were present.  This change adds the v2 lines that handle this.
  • Loading branch information
whitwham authored and daviesrob committed Sep 23, 2021
1 parent 4a79f25 commit dfb1947
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions hfile_s3.c
Original file line number Diff line number Diff line change
Expand Up @@ -1058,6 +1058,10 @@ static int v4_auth_header_callback(void *ctx, char ***hdrs) {
return -1;
}

if (!ad->id.l || !ad->secret.l) {
return copy_auth_headers(ad, hdrs);
}

hash_string("", 0, content_hash); // empty hash

ad->canonical_query_string.l = 0;
Expand Down

0 comments on commit dfb1947

Please sign in to comment.