Skip to content

Commit

Permalink
fix miss
Browse files Browse the repository at this point in the history
  • Loading branch information
waahm7 committed Jan 28, 2025
1 parent 365f0d5 commit 70a8950
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions source/credentials.c
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,7 @@ struct aws_credentials *aws_credentials_new_from_string_with_account_id(
const struct aws_string *session_token,
const struct aws_string *account_id,
uint64_t expiration_timepoint_seconds) {

struct aws_byte_cursor access_key_cursor = aws_byte_cursor_from_string(access_key_id);
struct aws_byte_cursor secret_access_key_cursor = aws_byte_cursor_from_string(secret_access_key);
struct aws_byte_cursor session_token_cursor;
Expand Down
2 changes: 1 addition & 1 deletion source/credentials_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ struct aws_credentials *aws_parse_credentials_from_aws_json_object(
AWS_ZERO_STRUCT(token_cursor);
if (options->token_name) {
token = aws_json_value_get_from_object(document_root, aws_byte_cursor_from_c_str((char *)options->token_name));
if (!aws_json_value_is_string(token) || aws_json_value_get_string(token, &token_cursor) == AWS_OP_ERR) {
if (!aws_json_value_is_string(token) || aws_json_value_get_string(token, &token_cursor) == AWS_OP_ERR || token_cursor.len == 0) {
if (options->token_required) {
AWS_LOGF_ERROR(AWS_LS_AUTH_CREDENTIALS_PROVIDER, "Failed to parse Token from Json document.");
goto done;
Expand Down

0 comments on commit 70a8950

Please sign in to comment.