Forgejo/routers
Gergely Nagy 6f35a5ab90
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 13:32:39 +02:00
..
api Fix branch_protection api shows users/teams who has no readAccess (#30291) (#30544) 2024-04-21 18:10:34 +02:00
common Use relative links for commits, mentions, and issues in markdown (#29427) 2024-03-20 08:46:28 +01:00
install s/Gitea/Forgejo in various log messages and comments 2024-04-22 14:41:17 +00:00
private hooks: Harden when we accept push options that change repo settings 2024-04-20 05:58:39 +00:00
utils Improve user search display name (#29002) 2024-02-01 17:10:16 +00:00
web Fix Issue watching / unwatching on the web ui 2024-05-01 13:32:39 +02:00
init.go s/Gitea/Forgejo in various log messages and comments 2024-04-22 14:41:17 +00:00