mirror of
https://github.com/hashicorp/vault.git
synced 2026-06-04 14:25:35 -04:00
Disallow writing to empty paths (#5702)
This commit is contained in:
parent
0974e52c24
commit
959a70e4a9
1 changed files with 4 additions and 0 deletions
|
|
@ -167,6 +167,10 @@ func (b *PassthroughBackend) GeneratesLeases() bool {
|
|||
}
|
||||
|
||||
func (b *PassthroughBackend) handleWrite(ctx context.Context, req *logical.Request, data *framework.FieldData) (*logical.Response, error) {
|
||||
if req.Path == "" {
|
||||
return logical.ErrorResponse("missing path"), nil
|
||||
}
|
||||
|
||||
// Check that some fields are given
|
||||
if len(req.Data) == 0 {
|
||||
return logical.ErrorResponse("missing data fields"), nil
|
||||
|
|
|
|||
Loading…
Reference in a new issue