diff --git a/cmd/admin-policy-create.go b/cmd/admin-policy-create.go index de1b5a1098..283a3fdf46 100644 --- a/cmd/admin-policy-create.go +++ b/cmd/admin-policy-create.go @@ -18,8 +18,10 @@ package cmd import ( + "errors" "fmt" "os" + "strings" "github.com/fatih/color" "github.com/minio/cli" @@ -126,6 +128,10 @@ func mainAdminPolicyCreate(ctx *cli.Context) error { args := ctx.Args() aliasedURL := args.Get(0) + if strings.Contains(args.Get(1), ",") { + fatalIf(probe.NewError(errors.New("policy name may not include comma")), "Only a single policy may be specified here.") + } + policy, e := os.ReadFile(args.Get(2)) fatalIf(probe.NewError(e).Trace(args...), "Unable to get policy")