forgejo/release-notes/8.0.0/fix
Gergely Nagy 632a274b8f
Fix Issue watching / unwatching on the web ui
When subscribing or unsubscribing to/from an issue on the web ui, the
request was posted to a route handled by `repo.IssueWatch`. This
function used `ctx.Req.PostForm.Get()`, erroneously.

`request.PostForm` is *only* available if `request.ParseForm()` has been
called before it. The function in question did not do that. Under some
circumstances, something, somewhere did end up calling `ParseForm()`,
but not in every scenario.

Since we do not need to check for multiple values, the easiest fix here
is to use `ctx.Req.PostFormValue`, which will call `ParseForm()` if
necessary.

Fixes #3516.

Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>
2024-05-01 11:04:54 +02:00
..
3363.md fix(Dockerfile.rootless): revert to default path for app.ini 2024-04-26 21:30:10 +02:00
3430.md docs(release-notes): split items in files to avoid conflicts (#3452) 2024-04-26 08:26:33 +00:00
3442.md docs(release-notes): split items in files to avoid conflicts (#3452) 2024-04-26 08:26:33 +00:00
3504.md added release notes 2024-04-30 12:05:22 +02:00
3562.md Fix Issue watching / unwatching on the web ui 2024-05-01 11:04:54 +02:00
3570.md Fix git_model.FindBranchesByRepoAndBranchName 2024-05-01 00:34:39 +02:00