From d93fa132bba597e71c4dd483663d2069e7117bf1 Mon Sep 17 00:00:00 2001 From: Radoslaw Zarzynski Date: Sun, 24 Apr 2016 17:41:55 +0200 Subject: [PATCH] rgw: fix printing wrong X-Storage-Url in Swift's TempAuth. If the option "rgw_swift_account_in_url" is being set to true, both user and subuser IDs will be present in the X-Storage-Url header generated by the implementation of Swift API's TempAuth. This patch rectifies this behavior and makes that only the user identifier will be placed there. Fixes: http://tracker.ceph.com/issues/15667 Signed-off-by: Radoslaw Zarzynski (cherry picked from commit 88f4c67d822388d2038454a25ead7e9a11f404b5) --- src/rgw/rgw_swift_auth.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rgw/rgw_swift_auth.cc b/src/rgw/rgw_swift_auth.cc index 32234d7f2c1ef..8c7f032624e92 100644 --- a/src/rgw/rgw_swift_auth.cc +++ b/src/rgw/rgw_swift_auth.cc @@ -215,7 +215,7 @@ void RGW_SWIFT_Auth_Get::execute() tenant_path.append(g_conf->rgw_swift_tenant_name); } else if (g_conf->rgw_swift_account_in_url) { tenant_path = "/AUTH_"; - tenant_path.append(user_str); + tenant_path.append(info.user_id.to_str()); } STREAM_IO(s)->print("X-Storage-Url: %s/%s/v1%s\r\n", swift_url.c_str(), -- 2.39.5