From 70cdb2ed2b92dfd72f994a05b3b84399d33c4657 Mon Sep 17 00:00:00 2001 From: Stefano Date: Tue, 15 Mar 2022 15:40:03 +0100 Subject: [PATCH] Handle capability invalidation --- client/handlers.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/client/handlers.go b/client/handlers.go index f612fe9..8ddcafa 100644 --- a/client/handlers.go +++ b/client/handlers.go @@ -110,7 +110,11 @@ func capabilitySet() *capSet { func (c *capSet) Add(caps ...string) { c.mu.Lock() for _, cap := range caps { - c.caps[cap] = true + if strings.HasPrefix(cap, "-") { + c.caps[cap[1:]] = false + } else { + c.caps[cap] = true + } } c.mu.Unlock() }