diff options
author | Aravinth Manivannan <realaravinth@batsense.net> | 2024-04-04 10:37:58 +0200 |
---|---|---|
committer | Earl Warren <earl-warren@noreply.codeberg.org> | 2024-04-04 18:52:25 +0200 |
commit | fc3c944c160330148bc4daffad352aa1b062aaef (patch) | |
tree | e1604429f33f261848196fc4e862996864a3ee58 /routers | |
parent | feat: parse for all ForgeFed actors (diff) | |
download | forgejo-fc3c944c160330148bc4daffad352aa1b062aaef.tar.xz forgejo-fc3c944c160330148bc4daffad352aa1b062aaef.zip |
fix: cleanup webfinger URI parsing
Diffstat (limited to 'routers')
-rw-r--r-- | routers/web/webfinger.go | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/routers/web/webfinger.go b/routers/web/webfinger.go index 65963cf379..099f6236a6 100644 --- a/routers/web/webfinger.go +++ b/routers/web/webfinger.go @@ -70,8 +70,7 @@ func WebfingerQuery(ctx *context.Context) { return } - p, _ := strings.CutPrefix(resource.Path, "/") - p, _ = strings.CutSuffix(p, "/") + p := strings.Trim(resource.Path, "/") if len(p) == 0 { ctx.Error(http.StatusNotFound) return |