]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: Fix IgnorePublicACLs for bucket ACLs
authorAbhishek Lekshmanan <abhishek@suse.com>
Tue, 8 Oct 2019 13:18:35 +0000 (15:18 +0200)
committerAbhishek Lekshmanan <abhishek@suse.com>
Mon, 3 Feb 2020 16:53:34 +0000 (17:53 +0100)
Currently Bucket ACLs with IgnorePublicACLs were broken this should fix that

Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
src/rgw/rgw_common.cc

index b38f3448ca0057c6ee05f28c532ac5bea6300275..350de785bd965a33c6af48a1f65eebe3f76f1f05 100644 (file)
@@ -1198,8 +1198,10 @@ bool verify_bucket_permission_no_policy(const DoutPrefixProvider* dpp, struct pe
   if ((perm & (int)s->perm_mask) != perm)
     return false;
 
-  if (bucket_acl->verify_permission(dpp, *s->identity, perm, perm,
-                                    s->get_referer()))
+  if (bucket_acl->verify_permission(dpp, *s->auth.identity, perm, perm,
+                                    s->info.env->get("HTTP_REFERER"),
+                                    s->bucket_access_conf &&
+                                    s->bucket_access_conf->ignore_public_acls()))
     return true;
 
   if (!user_acl)