1
0
Quellcode durchsuchen

security: require authentication for attachment uploads (#8128)

https://github.com/gogs/gogs/security/advisories/GHSA-fc3h-92p8-h36f

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
ᴊᴏᴇ ᴄʜᴇɴ vor 1 Woche
Ursprung
Commit
628216d588
1 geänderte Dateien mit 4 neuen und 1 gelöschten Zeilen
  1. 4 1
      internal/cmd/web.go

+ 4 - 1
internal/cmd/web.go

@@ -329,9 +329,12 @@ func runWeb(c *cli.Context) error {
 					return
 				}
 			})
+		}, ignSignIn)
+
+		m.Group("", func() {
 			m.Post("/issues/attachments", repo.UploadIssueAttachment)
 			m.Post("/releases/attachments", repo.UploadReleaseAttachment)
-		}, ignSignIn)
+		}, reqSignIn)
 
 		m.Group("/:username", func() {
 			m.Post("/action/:action", user.Action)