From 0d120f8a8dae9482cc3813eeb06108e5b76a80f4 Mon Sep 17 00:00:00 2001 From: KN4CK3R Date: Fri, 22 Apr 2022 13:55:58 +0000 Subject: [PATCH] Add visible check. --- routers/web/webfinger.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/routers/web/webfinger.go b/routers/web/webfinger.go index 22008765fa..c6f915a6e4 100644 --- a/routers/web/webfinger.go +++ b/routers/web/webfinger.go @@ -85,7 +85,10 @@ func WebfingerQuery(ctx *context.Context) { return } - // Should we check IsUserVisibleToViewer here? + if !user_model.IsUserVisibleToViewer(u, ctx.Doer) { + ctx.Error(http.StatusNotFound) + return + } aliases := make([]string, 0, 1) if !u.KeepEmailPrivate {