Use PostFormValue instead of PostForm.Get
In `repo.RemoveDependency`, use `PostFormValue` instead of `PostForm.Get`. The latter requires `ParseForm()` to be called prior, and in this case, has no benefit over `PostFormValue` anyway (which calls `ParseForm()` if necessary). While this currently does not cause any issue as far as I can tell, it feels like a bug lying in wait for the perfect opportunity. Lets squash it before it can do harm. Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>
This commit is contained in:
parent
6ba60f61cb
commit
b08aef967e
2 changed files with 89 additions and 1 deletions
|
@ -109,7 +109,7 @@ func RemoveDependency(ctx *context.Context) {
|
|||
}
|
||||
|
||||
// Dependency Type
|
||||
depTypeStr := ctx.Req.PostForm.Get("dependencyType")
|
||||
depTypeStr := ctx.Req.PostFormValue("dependencyType")
|
||||
|
||||
var depType issues_model.DependencyType
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue