Update KV dependency (#5707)

This commit is contained in:
Vishal Nayak 2018-11-06 14:33:21 -05:00 committed by GitHub
parent 959a70e4a9
commit ba67172f0d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 3 deletions

View file

@ -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 {

View file

@ -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 {

View file

@ -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")

6
vendor/vendor.json vendored
View file

@ -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=",