summaryrefslogtreecommitdiff
path: root/internal/web/base.go
diff options
context:
space:
mode:
authorLibravatar Adam Harvey <adam@adamharvey.name>2022-11-05 00:39:36 -0700
committerLibravatar GitHub <noreply@github.com>2022-11-05 08:39:36 +0100
commitee6a0a1e1582bde943b14f1c250a79c73988051d (patch)
tree7841f0b9ca1290277e0f3ecb813e4c1ca1de4892 /internal/web/base.go
parent[docs] add matrix space to readme (#952) (diff)
downloadgotosocial-ee6a0a1e1582bde943b14f1c250a79c73988051d.tar.xz
[bugfix] use the landing page user directly (#956)
If set, the landing page user configuration value is used as a Gin context parameter, which seems incorrect, since a normal request isn't going to have a parameter named after an arbitrarily configured user. Instead, the user name should be used directly when building the redirect URL.
Diffstat (limited to 'internal/web/base.go')
-rw-r--r--internal/web/base.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/web/base.go b/internal/web/base.go
index 0dae30772..51238afaf 100644
--- a/internal/web/base.go
+++ b/internal/web/base.go
@@ -32,7 +32,7 @@ func (m *Module) baseHandler(c *gin.Context) {
// if a landingPageUser is set in the config, redirect to that user's profile
if landingPageUser := config.GetLandingPageUser(); landingPageUser != "" {
- c.Redirect(http.StatusFound, "/@"+c.Param(strings.ToLower(landingPageUser)))
+ c.Redirect(http.StatusFound, "/@"+strings.ToLower(landingPageUser))
return
}