Merge pull request #53801 from BBoozmen/oozmen_sts_keygen

RGW/STS: when generating keys, take the trailing null character into account

Reviewed-by: Pritha Srivastava <prsrivas@redhat.com>
This commit is contained in:
J. Eric Ivancich 2023-10-19 13:14:46 -04:00 committed by GitHub
commit c959100fba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -54,7 +54,7 @@ int Credentials::generateCredentials(const DoutPrefixProvider *dpp,
rgw::auth::Identity* identity)
{
uuid_d accessKey, secretKey;
char accessKeyId_str[MAX_ACCESS_KEY_LEN], secretAccessKey_str[MAX_SECRET_KEY_LEN];
char accessKeyId_str[MAX_ACCESS_KEY_LEN + 1], secretAccessKey_str[MAX_SECRET_KEY_LEN + 1];
//AccessKeyId
gen_rand_alphanumeric_plain(cct, accessKeyId_str, sizeof(accessKeyId_str));