[Bug] Avatars missing after recent upgrade #42

Closed
opened 2021-05-05 01:07:34 +02:00 by wanderer · 1 comment
Owner

there's an issue with the recent upgrade of Gitea that won't properly show user-supplied avatars and org avatars.
a little write-up has been created and the issues is tracked upstream.
https://github.com/go-gitea/gitea/issues/15727

there's an issue with the recent upgrade of Gitea that won't properly show user-supplied avatars and org avatars. a little write-up has been created and the issues is tracked upstream. ⇒ https://github.com/go-gitea/gitea/issues/15727
wanderer added the
bug
upstream-related
labels 2021-05-05 01:07:35 +02:00
wanderer added this to the General project 2021-05-05 01:07:35 +02:00
Author
Owner

the issue fix will soon be merged upstream
https://github.com/go-gitea/gitea/pull/15731

I already applied the patch here, though.

From 98165a12bbcac763c416be15cecb01bd30a67da3 Mon Sep 17 00:00:00 2001
From: Andrew Thornton <art27@cantab.net>
Date: Wed, 5 May 2021 09:43:56 +0100
Subject: [PATCH] Fix broken avatars since #15301

There was a missing * from the avatars routes in #15301.

Fix #15727

Signed-off-by: Andrew Thornton <art27@cantab.net>
---
 routers/routes/web.go | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/routers/routes/web.go b/routers/routes/web.go
index e5ddff0b00e..eb2a9025d03 100644
--- a/routers/routes/web.go
+++ b/routers/routes/web.go
@@ -163,8 +163,8 @@ func WebRoutes() *web.Route {
 	))

 	// We use r.Route here over r.Use because this prevents requests that are not for avatars having to go through this additional handler
-	routes.Route("/avatars", "GET, HEAD", storageHandler(setting.Avatar.Storage, "avatars", storage.Avatars))
-	routes.Route("/repo-avatars", "GET, HEAD", storageHandler(setting.RepoAvatar.Storage, "repo-avatars", storage.RepoAvatars))
+	routes.Route("/avatars/*", "GET, HEAD", storageHandler(setting.Avatar.Storage, "avatars", storage.Avatars))
+	routes.Route("/repo-avatars/*", "GET, HEAD", storageHandler(setting.RepoAvatar.Storage, "repo-avatars", storage.RepoAvatars))

 	// for health check - doeesn't need to be passed through gzip handler
 	routes.Head("/", func(w http.ResponseWriter, req *http.Request) {
the issue fix will soon be merged upstream ⇒ https://github.com/go-gitea/gitea/pull/15731 I already applied the patch here, though. ```patch From 98165a12bbcac763c416be15cecb01bd30a67da3 Mon Sep 17 00:00:00 2001 From: Andrew Thornton <art27@cantab.net> Date: Wed, 5 May 2021 09:43:56 +0100 Subject: [PATCH] Fix broken avatars since #15301 There was a missing * from the avatars routes in #15301. Fix #15727 Signed-off-by: Andrew Thornton <art27@cantab.net> --- routers/routes/web.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/routers/routes/web.go b/routers/routes/web.go index e5ddff0b00e..eb2a9025d03 100644 --- a/routers/routes/web.go +++ b/routers/routes/web.go @@ -163,8 +163,8 @@ func WebRoutes() *web.Route { )) // We use r.Route here over r.Use because this prevents requests that are not for avatars having to go through this additional handler - routes.Route("/avatars", "GET, HEAD", storageHandler(setting.Avatar.Storage, "avatars", storage.Avatars)) - routes.Route("/repo-avatars", "GET, HEAD", storageHandler(setting.RepoAvatar.Storage, "repo-avatars", storage.RepoAvatars)) + routes.Route("/avatars/*", "GET, HEAD", storageHandler(setting.Avatar.Storage, "avatars", storage.Avatars)) + routes.Route("/repo-avatars/*", "GET, HEAD", storageHandler(setting.RepoAvatar.Storage, "repo-avatars", storage.RepoAvatars)) // for health check - doeesn't need to be passed through gzip handler routes.Head("/", func(w http.ResponseWriter, req *http.Request) { ```
Sign in to join this conversation.
No description provided.