From 612eae9ae8a326511b9e81d915dde7d1e47631b1 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Wed, 28 Jan 2026 14:04:08 -0800 Subject: [PATCH] s3tables: fix inconsistent permission check in handleCreateTableBucket --- weed/s3api/s3tables/handler_bucket_create.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/weed/s3api/s3tables/handler_bucket_create.go b/weed/s3api/s3tables/handler_bucket_create.go index a8c7a9494..476aba125 100644 --- a/weed/s3api/s3tables/handler_bucket_create.go +++ b/weed/s3api/s3tables/handler_bucket_create.go @@ -14,8 +14,9 @@ import ( // handleCreateTableBucket creates a new table bucket func (h *S3TablesHandler) handleCreateTableBucket(w http.ResponseWriter, r *http.Request, filerClient FilerClient) error { // Check permission + accountID := h.getAccountID(r) principal := h.getPrincipalFromRequest(r) - if !CanCreateTableBucket(principal, h.accountID) { + if !CanCreateTableBucket(principal, accountID) { h.writeError(w, http.StatusForbidden, ErrCodeAccessDenied, "not authorized to create table buckets") return NewAuthError("CreateTableBucket", principal, "not authorized to create table buckets") }