From ba67172f0deb193d5de63d35bfdccb5e96c16f78 Mon Sep 17 00:00:00 2001 From: Vishal Nayak Date: Tue, 6 Nov 2018 14:33:21 -0500 Subject: [PATCH] Update KV dependency (#5707) --- .../hashicorp/vault-plugin-secrets-kv/passthrough.go | 3 +++ .../hashicorp/vault-plugin-secrets-kv/path_data.go | 3 +++ .../hashicorp/vault-plugin-secrets-kv/path_metadata.go | 3 +++ vendor/vendor.json | 6 +++--- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/vendor/github.com/hashicorp/vault-plugin-secrets-kv/passthrough.go b/vendor/github.com/hashicorp/vault-plugin-secrets-kv/passthrough.go index 27b54c5a6d..1be5fcb608 100644 --- a/vendor/github.com/hashicorp/vault-plugin-secrets-kv/passthrough.go +++ b/vendor/github.com/hashicorp/vault-plugin-secrets-kv/passthrough.go @@ -192,6 +192,9 @@ func (b *PassthroughBackend) GeneratesLeases() bool { func (b *PassthroughBackend) handleWrite() framework.OperationFunc { return func(ctx context.Context, req *logical.Request, data *framework.FieldData) (*logical.Response, error) { key := data.Get("path").(string) + if key == "" { + return logical.ErrorResponse("missing path"), nil + } // Check that some fields are given if len(req.Data) == 0 { diff --git a/vendor/github.com/hashicorp/vault-plugin-secrets-kv/path_data.go b/vendor/github.com/hashicorp/vault-plugin-secrets-kv/path_data.go index f40b99e2a6..b03e3b42ca 100644 --- a/vendor/github.com/hashicorp/vault-plugin-secrets-kv/path_data.go +++ b/vendor/github.com/hashicorp/vault-plugin-secrets-kv/path_data.go @@ -165,6 +165,9 @@ func (b *versionedKVBackend) pathDataRead() framework.OperationFunc { func (b *versionedKVBackend) pathDataWrite() framework.OperationFunc { return func(ctx context.Context, req *logical.Request, data *framework.FieldData) (*logical.Response, error) { key := data.Get("path").(string) + if key == "" { + return logical.ErrorResponse("missing path"), nil + } config, err := b.config(ctx, req.Storage) if err != nil { diff --git a/vendor/github.com/hashicorp/vault-plugin-secrets-kv/path_metadata.go b/vendor/github.com/hashicorp/vault-plugin-secrets-kv/path_metadata.go index c4637a2114..c98b077837 100644 --- a/vendor/github.com/hashicorp/vault-plugin-secrets-kv/path_metadata.go +++ b/vendor/github.com/hashicorp/vault-plugin-secrets-kv/path_metadata.go @@ -117,6 +117,9 @@ func (b *versionedKVBackend) pathMetadataRead() framework.OperationFunc { func (b *versionedKVBackend) pathMetadataWrite() framework.OperationFunc { return func(ctx context.Context, req *logical.Request, data *framework.FieldData) (*logical.Response, error) { key := data.Get("path").(string) + if key == "" { + return logical.ErrorResponse("missing path"), nil + } maxRaw, mOk := data.GetOk("max_versions") casRaw, cOk := data.GetOk("cas_required") diff --git a/vendor/vendor.json b/vendor/vendor.json index 860d2cf60d..4b1b080cde 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -1503,10 +1503,10 @@ "revisionTime": "2018-10-19T21:34:31Z" }, { - "checksumSHA1": "nDVAV6IKtddRMX1kDjKHPv0oZ9I=", + "checksumSHA1": "0Uh543eKwac5M7mSsijM0GNekto=", "path": "github.com/hashicorp/vault-plugin-secrets-kv", - "revision": "cf99b3647947259273d9d0ada72d507d46fae89c", - "revisionTime": "2018-11-06T01:44:13Z" + "revision": "2236f141171e282e0d3d2c5bb6c695e4def5302f", + "revisionTime": "2018-11-06T19:05:20Z" }, { "checksumSHA1": "ldkAQ1CpiAaQ9sti0qIch+UyRsI=",