Skip to content

Commit 8a3403d

Browse files
committed
Fail if KeepEmailPrivate.
1 parent b28ee5d commit 8a3403d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

routers/web/webfinger.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@ func WebfingerQuery(ctx *context.Context) {
7171
u, err = user_model.GetUserByNameCtx(ctx, parts[0])
7272
case "mailto":
7373
u, err = user_model.GetUserByEmailContext(ctx, uri)
74+
if u != nil && u.KeepEmailPrivate {
75+
err = user_model.ErrUserNotExist{}
76+
}
7477
default:
7578
ctx.Error(http.StatusBadRequest)
7679
return

0 commit comments

Comments
 (0)