mirror of https://github.com/status-im/consul.git
Adds guard in session ACL check in case session is not found.
Fixes #2624.
This commit is contained in:
parent
d549c9c9f0
commit
76c1e2dd6d
|
@ -43,6 +43,9 @@ func (s *Session) Apply(args *structs.SessionRequest, reply *string) error {
|
|||
state := s.srv.fsm.State()
|
||||
_, existing, err := state.SessionGet(nil, args.Session.ID)
|
||||
if err != nil {
|
||||
return fmt.Errorf("Session lookup failed: %v", err)
|
||||
}
|
||||
if existing == nil {
|
||||
return fmt.Errorf("Unknown session %q", args.Session.ID)
|
||||
}
|
||||
if !acl.SessionWrite(existing.Node) {
|
||||
|
|
Loading…
Reference in New Issue