Browse Source

fix: Destroying a session that doesn't exist returns status cod… (#6905)

fix #6840
pull/6833/head
rerorero 5 years ago committed by GitHub
parent
commit
2630a949f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      agent/consul/session_endpoint.go

2
agent/consul/session_endpoint.go

@ -58,7 +58,7 @@ func (s *Session) Apply(args *structs.SessionRequest, reply *string) error {
return fmt.Errorf("Session lookup failed: %v", err)
}
if existing == nil {
return fmt.Errorf("Unknown session %q", args.Session.ID)
return nil
}
if authz.SessionWrite(existing.Node, &authzContext) != acl.Allow {
return acl.ErrPermissionDenied

Loading…
Cancel
Save