Skip to content

Commit

Permalink
fix: Destroying a session that doesn't exist returns status cod… (#6905)
Browse files Browse the repository at this point in the history
fix #6840
  • Loading branch information
rerorero authored Feb 18, 2020
1 parent 096326d commit 2630a94
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion agent/consul/session_endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2630a94

Please sign in to comment.