mirror of
https://github.com/gogs/gogs.git
synced 2026-03-20 02:41:52 +01:00
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>
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user