fix sys/leases panic when lease_id is nil (#18951)
* fix sys/leases panic when lease_id is nil * add changelog entry
This commit is contained in:
parent
10dd6614fe
commit
c74c057bdb
|
@ -0,0 +1,3 @@
|
|||
```release-note:bug
|
||||
core: Prevent panics in `sys/leases/lookup`, `sys/leases/revoke`, and `sys/leases/renew` endpoints if provided `lease_id` is null
|
||||
```
|
|
@ -632,7 +632,7 @@ func (c *Core) handleCancelableRequest(ctx context.Context, req *logical.Request
|
|||
case "sys/leases/lookup", "sys/leases/renew", "sys/leases/revoke", "sys/leases/revoke-force":
|
||||
leaseID, ok := req.Data["lease_id"]
|
||||
// If lease ID is not present, break out and let the backend handle the error
|
||||
if !ok {
|
||||
if !ok || leaseID == nil {
|
||||
break
|
||||
}
|
||||
_, nsID := namespace.SplitIDFromString(leaseID.(string))
|
||||
|
|
Loading…
Reference in New Issue