代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/ceph 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From ed7c2d0a58fb87201777fb4097d5a2b650593b31 Mon Sep 17 00:00:00 2001
From: Adam C. Emerson <aemerson@redhat.com>
Misplaced colons can result in radosgw thinking is has a bucket URL
but with no bucket name, leading to a crash later on.
Change-Id: 9746e8011ff1de6de7dba9c0041e28a16c8f6828
Change-Id: 95c6c2d209a877b934e05e727a181de8c68accd3
Fixes: https://tracker.ceph.com/issues/55765
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
(cherry picked from commit 3ee9a3b)
Fixes: https://tracker.ceph.com/issues/56586
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
---
src/rgw/rgw_common.cc | 5 +++++
src/rgw/rgw_sal.h | 6 +++++-
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/src/rgw/rgw_common.cc b/src/rgw/rgw_common.cc
index b44d4bf..ce7b94c 100644
--- a/src/rgw/rgw_common.cc
+++ b/src/rgw/rgw_common.cc
@@ -1279,6 +1279,11 @@ bool verify_bucket_permission_no_policy(const DoutPrefixProvider* dpp, struct re
bool verify_bucket_permission(const DoutPrefixProvider* dpp, struct req_state * const s, const uint64_t op)
{
+ if (rgw::sal::RGWBucket::empty(s->bucket)) {
+ // request is missing a bucket name
+ return false;
+ }
+
perm_state_from_req_state ps(s);
return verify_bucket_permission(dpp,
diff --git a/src/rgw/rgw_sal.h b/src/rgw/rgw_sal.h
index 41da8bc..197f975 100644
--- a/src/rgw/rgw_sal.h
+++ b/src/rgw/rgw_sal.h
@@ -279,8 +279,12 @@ class RGWBucket {
void convert(cls_user_bucket_entry *b) const {
ent.convert(b);
}
+
+ /** Check if a Bucket pointer is empty */
+ static bool empty(const RGWBucket* b) { return (!b || b->empty()); }
+ /** Check if a Bucket unique pointer is empty */
+ static bool empty(const std::unique_ptr<RGWBucket>& b) { return (!b || b->empty()); }
- static bool empty(RGWBucket* b) { return (!b || b->empty()); }
virtual std::unique_ptr<RGWBucket> clone() = 0;
/* dang - This is temporary, until the API is completed */
--
2.13.0.windows.1
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。