From 50a876e14c815eb4192cbc0d6bd08217c9a28bce Mon Sep 17 00:00:00 2001 From: Maxwell G Date: Wed, 12 Nov 2025 16:46:51 -0600 Subject: [PATCH] webhooks: do not limit webhooks by token_hash When a user re-authenticates with an OAuth2 app, the app would not be able to query or delete webhooks it created with a previous session. This was a problem for a tool I am developing and removing this constraint fixes the issue. --- webhooks/config.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/webhooks/config.go b/webhooks/config.go index 717dca32f415af6eda47ff7fd43da9cd6624069e..8bf62d3f30b0c11f6f49ab9c2c1d41ecab4ea16b 100644 --- a/webhooks/config.go +++ b/webhooks/config.go @@ -76,10 +76,8 @@ func FilterWebhooks(ctx context.Context) (sq.Sqlizer, error) { sq.Expr(`auth_method = 'INTERNAL'`), }, nil } else if ac.ClientID != nil { - // XXX: Should we maybe return all webhooks configured by client ID? return sq.And{ sq.Expr(`NOW() at time zone 'utc' < expires`), - sq.Expr(`token_hash = ?`, ac.TokenHash), sq.Expr(`client_id = ?`, *ac.ClientID), sq.Expr(`user_id = ?`, user.UserID), }, nil