forgejo/routers
Gusted 334b703b17
[GITEA] Fix panic in canSoftDeleteContentHistory
- It's possible that `canSoftDeleteContentHistory` is called without
`ctx.Doer` being set, such as an anonymous user requesting the
`/content-history/detail` endpoint.
- Add a simple condition to always set to `canSoftDelete` to false if an
anonymous user is requesting this, this avoids a panic in the code that
assumes `ctx.Doer` is set.
- Added integration testing.

(cherry picked from commit 0b5db0dcc6)
(cherry picked from commit 30d168bcc8)
(cherry picked from commit 19be82b7ef)
2024-01-28 10:58:28 +01:00
..
api [GITEA] POST /repos/{owner}/{repo}/pulls/{index}/reviews/{id}/comments 2024-01-28 10:58:28 +01:00
common Rework markup link rendering (#26745) 2024-01-15 08:49:24 +00:00
install [GITEA] Add password length check on install page 2024-01-28 09:22:15 +01:00
private [CLI] implement forgejo-cli 2024-01-28 07:47:32 +01:00
utils Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
web [GITEA] Fix panic in canSoftDeleteContentHistory 2024-01-28 10:58:28 +01:00
init.go [API] Forgejo API /api/forgejo/v1 2024-01-28 08:13:13 +01:00