File tree 1 file changed +10
-2
lines changed
1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ package org
6
6
7
7
import (
8
8
"net/http"
9
+ "strings"
9
10
10
11
"code.gitea.io/gitea/models"
11
12
"code.gitea.io/gitea/models/db"
@@ -23,7 +24,14 @@ const (
23
24
24
25
// Home show organization home page
25
26
func Home (ctx * context.Context ) {
26
- ctx .SetParams (":org" , ctx .Params (":username" ))
27
+ uname := ctx .Params (":username" )
28
+
29
+ if strings .HasSuffix (uname , ".keys" ) || strings .HasSuffix (uname , ".gpg" ) {
30
+ ctx .NotFound ("" , nil )
31
+ return
32
+ }
33
+
34
+ ctx .SetParams (":org" , uname )
27
35
context .HandleOrgAssignment (ctx )
28
36
if ctx .Written () {
29
37
return
@@ -109,7 +117,7 @@ func Home(ctx *context.Context) {
109
117
return
110
118
}
111
119
112
- var opts = & models.FindOrgMembersOpts {
120
+ opts : = & models.FindOrgMembersOpts {
113
121
OrgID : org .ID ,
114
122
PublicOnly : true ,
115
123
ListOptions : db.ListOptions {Page : 1 , PageSize : 25 },
You can’t perform that action at this time.
0 commit comments