]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: rgw_rest_account.cc: Fix quota variable types from int32_t to int64_t 69876/head
authorTheofilos Mouratidis <theofilos.mouratidis@switch.ch>
Wed, 1 Jul 2026 11:34:11 +0000 (13:34 +0200)
committerTheofilos Mouratidis <theofilos.mouratidis@switch.ch>
Wed, 1 Jul 2026 11:59:23 +0000 (13:59 +0200)
The max_size and max_objects in the Admin-OPs REST interface were accidentally set to int32_t
This allowed to set only up to 2GB of quota for accounts

Signed-off-by: Theofilos Mouratidis <mtheofilos@gmail.com>
src/rgw/rgw_rest_account.cc

index 1b2ac6176de98c46c84c64cee70cffc1ea8fd633..7eca38c529798e31ebcbc5e62f6ca44977ababe3 100644 (file)
@@ -273,16 +273,16 @@ void RGWOp_Account_Quota_Set::execute(optional_yield y)
     return;
   }
 
-  int32_t quota_max_size = 0;
+  int64_t quota_max_size = 0;
   bool has_quota_max_size = false;
-  RESTArgs::get_int32(s, "max-size", 0, &quota_max_size, &has_quota_max_size);
+  RESTArgs::get_int64(s, "max-size", 0, &quota_max_size, &has_quota_max_size);
   if (has_quota_max_size) {
     op_state.quota_max_size = quota_max_size;
   }
 
-  int32_t quota_max_objects = 0;
+  int64_t quota_max_objects = 0;
   bool has_quota_max_objects = false;
-  RESTArgs::get_int32(s, "max-objects", 0, &quota_max_objects, &has_quota_max_objects);
+  RESTArgs::get_int64(s, "max-objects", 0, &quota_max_objects, &has_quota_max_objects);
   if (has_quota_max_objects) {
     op_state.quota_max_objects = quota_max_objects;
   }