]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw/admin: hide bencoded torrent data from 'object stat' 50168/head
authorCasey Bodley <cbodley@redhat.com>
Fri, 10 Mar 2023 14:58:21 +0000 (09:58 -0500)
committerCasey Bodley <cbodley@redhat.com>
Fri, 10 Mar 2023 14:58:21 +0000 (09:58 -0500)
Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/rgw/rgw_admin.cc

index 8745b5b3dd4b38e18af28164b5120d4e6a186bb7..59fdb257f34834ce76105fad6640a33e56d70c54 100644 (file)
@@ -8196,6 +8196,11 @@ next:
         handled = decode_dump<RGWCompressionInfo>("compression", bl, formatter.get());
       } else if (iter->first == RGW_ATTR_DELETE_AT) {
         handled = decode_dump<utime_t>("delete_at", bl, formatter.get());
+      } else if (iter->first == RGW_ATTR_TORRENT) {
+        // contains bencoded binary data which shouldn't be output directly
+        // TODO: decode torrent info for display as json?
+        formatter->dump_string("torrent", "<contains binary data>");
+        handled = true;
       }
 
       if (!handled)