mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-10 09:09:02 +00:00
Send 404 on /{org}.gpg
(#18959)
This commit is contained in:
parent
1f45d1e130
commit
a90041d71a
|
@ -6,6 +6,7 @@ package org
|
|||
|
||||
import (
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
"code.gitea.io/gitea/models"
|
||||
"code.gitea.io/gitea/models/db"
|
||||
|
@ -23,7 +24,14 @@ const (
|
|||
|
||||
// Home show organization home page
|
||||
func Home(ctx *context.Context) {
|
||||
ctx.SetParams(":org", ctx.Params(":username"))
|
||||
uname := ctx.Params(":username")
|
||||
|
||||
if strings.HasSuffix(uname, ".keys") || strings.HasSuffix(uname, ".gpg") {
|
||||
ctx.NotFound("", nil)
|
||||
return
|
||||
}
|
||||
|
||||
ctx.SetParams(":org", uname)
|
||||
context.HandleOrgAssignment(ctx)
|
||||
if ctx.Written() {
|
||||
return
|
||||
|
|
Loading…
Reference in a new issue