]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
STS: when generating keys, take the trailing character into account 53801/head
authorOguzhan Ozmen <oozmen@bloomberg.net>
Tue, 3 Oct 2023 20:05:39 +0000 (16:05 -0400)
committerOguzhan Ozmen <oozmen@bloomberg.net>
Tue, 3 Oct 2023 22:08:20 +0000 (18:08 -0400)
Otherwise, STS acckey has 19 and secret key has 39 alphanumeric chars.

Signed-off-by: Oguzhan Ozmen <oozmen@bloomberg.net>
src/rgw/rgw_sts.cc

index b552834426a9cb8df1590e35190124229c018634..2b31d5c5a2972e370f2bb966dd8a5b728e4e6370 100644 (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));