diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2016-12-16 19:42:39 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-16 19:42:39 +0800 |
commit | 15c3d14d554f95423ea34ceeb0dc91bc479861f2 (patch) | |
tree | 5963a8a2aa6f85711ba7a3022e4651ffd85cca63 /routers | |
parent | 8aeeed0a2387523173452f1e26f0637f390a3daf (diff) | |
download | gitea-15c3d14d554f95423ea34ceeb0dc91bc479861f2.tar.gz gitea-15c3d14d554f95423ea34ceeb0dc91bc479861f2.zip |
fixed vulnerabilities on deleting release (#399)
Diffstat (limited to 'routers')
-rw-r--r-- | routers/repo/release.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/repo/release.go b/routers/repo/release.go index 7616d9e79e..dc5a54c6fb 100644 --- a/routers/repo/release.go +++ b/routers/repo/release.go @@ -296,7 +296,7 @@ func EditReleasePost(ctx *context.Context, form auth.EditReleaseForm) { // DeleteRelease delete a release func DeleteRelease(ctx *context.Context) { - if err := models.DeleteReleaseByID(ctx.QueryInt64("id")); err != nil { + if err := models.DeleteReleaseByID(ctx.QueryInt64("id"), ctx.User); err != nil { ctx.Flash.Error("DeleteReleaseByID: " + err.Error()) } else { ctx.Flash.Success(ctx.Tr("repo.release.deletion_success")) |