forgejo/routers
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
..
api Fix nil dereference on error (#30740) 2024-04-28 15:39:02 +02:00
common feat(api): implement branch/commit comparison API (#30349) 2024-04-21 11:58:18 +02:00
install s/Gitea/Forgejo in various log messages and comments 2024-04-21 21:26:15 +05:00
private Enable more revive linter rules (#30608) 2024-04-28 15:39:00 +02:00
utils [PORT] drop utils.IsExternalURL (and expand IsRiskyRedirectURL tests) (#3167) 2024-04-15 13:03:08 +00:00
web Fix Issue watching / unwatching on the web ui 2024-05-01 11:04:54 +02:00
init.go s/Gitea/Forgejo in various log messages and comments 2024-04-21 21:26:15 +05:00