From: Yehuda Sadeh Date: Wed, 17 Aug 2016 08:44:02 +0000 (-0700) Subject: rgw: REST client, don't sign requests if empty key X-Git-Tag: v11.1.0~681^2~19 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=0df0eabc41d60a3e5fe973744f34c12d6fe010d5;p=ceph.git rgw: REST client, don't sign requests if empty key If key is not passed in, don't try to sign the request. Signed-off-by: Yehuda Sadeh --- diff --git a/src/rgw/rgw_rest_client.cc b/src/rgw/rgw_rest_client.cc index 832bd37a908..24ea21dcdb5 100644 --- a/src/rgw/rgw_rest_client.cc +++ b/src/rgw/rgw_rest_client.cc @@ -208,6 +208,11 @@ void RGWRESTSimpleRequest::get_params_str(map& extra_args, strin int RGWRESTSimpleRequest::sign_request(RGWAccessKey& key, RGWEnv& env, req_info& info) { + /* don't sign if no key is provided */ + if (key.key.empty()) { + return 0; + } + map& m = env.get_map(); if (cct->_conf->subsys.should_gather(ceph_subsys_rgw, 20)) {