jojo/models/db
Mathieu Fenniak 9b76ac6cec [v11.0/forgejo] fix: verify PR author has write access to head to support allow maintainers edit (#12295)
Backport: https://codeberg.org/forgejo/forgejo/pulls/12292

When a pull request is opened, the author is able to mark that pull request to "Allow edits from maintainers", which grants the maintainers of the pull request's repo access to edit the pull request branch contents.  It is possible to create a pull request where the pull request author does not have the ability to edit the pull request branch.  Due to a missing security check for this case, maintainers of the pull request repo would be granted the ability to edit the pull request branch, even if the author of the pull request did not have that ability.  By exploiting this missing security check, a user can edit any branch in a repository if they're able to fork that repository.  The issue is being fixed by restricting the scope of "Allow edits from maintainers" to only grant that access if the pull request author also had access to edit the branch.

Thanks to Arvin Shivram of Brutecat Security for discovering and responsibly disclosing the vulnerability.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/12295
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
2026-04-29 05:29:46 +02:00
..
install [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
paginator [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
collation.go [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
common.go [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
consistency.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
context.go [v11.0/forgejo] fix: verify PR author has write access to head to support allow maintainers edit (#12295) 2026-04-29 05:29:46 +02:00
context_committer_test.go chore: use errors.New to replace fmt.Errorf with no parameters (#32800) 2024-12-15 09:15:57 +01:00
context_test.go [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
convert.go [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
engine.go [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
engine_test.go [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
error.go [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
index.go [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
index_test.go [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
iterate.go [v11.0/forgejo] fix: add forgejo doctor cleanup-commit-status command (#10686) (#10783) 2026-01-13 16:17:06 +01:00
iterate_test.go [v11.0/forgejo] fix: add forgejo doctor cleanup-commit-status command (#10686) (#10783) 2026-01-13 16:17:06 +01:00
list.go [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
list_test.go [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
log.go [v11.0/forgejo] chore(cleanup): suppress non actionable XORM warnings (#8022) 2025-05-30 13:43:41 +02:00
main_test.go [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
name.go [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
search.go [Refactor] Unify repo search order by logic (#30876) 2024-06-16 13:42:58 +02:00
sequence.go [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
sql_postgres_with_schema.go [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00