From 00d396e33afe0ba52c170468735323bdb3e4d077 Mon Sep 17 00:00:00 2001 From: Yehuda Sadeh Date: Thu, 28 Jan 2016 16:01:40 -0800 Subject: [PATCH] rgw: don't use s->bucket for metadata api path entry Fixes #14549 s->bucket is only initialized at the object store handler (post auth callback). We don't want to initialize it for other cases because it's not a real bucket, and initializing it will require going through the authorization path for this 'bucket'. Signed-off-by: Yehuda Sadeh --- src/rgw/rgw_rest_metadata.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rgw/rgw_rest_metadata.cc b/src/rgw/rgw_rest_metadata.cc index f97fdb4a72266..724e06ff79a24 100644 --- a/src/rgw/rgw_rest_metadata.cc +++ b/src/rgw/rgw_rest_metadata.cc @@ -32,8 +32,8 @@ static inline void frame_metadata_key(req_state *s, string& out) { string key = s->info.args.get("key", &exists); string section; - if (!s->bucket_name.empty()) { - section = s->bucket_name; + if (!s->init_state.url_bucket.empty()) { + section = s->init_state.url_bucket; } else { section = key; key.clear(); -- 2.39.5