Disallow writing to empty paths (#5702)
This commit is contained in:
parent
ef8f40647a
commit
0b5ea9917e
|
@ -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 New Issue