forgejo/cmd
Gusted 9d82059840
[BUG] Do not allow deletion of internal references
- Currently it's possible to modify remote references such as
`refs/pull/<idx>/head` and `refs/heads/<branch>`.
- Disallow that the pull request reference is deleted, as this should
not be at the control of the user. Doing so would result in
inconsistencies within Forgejo and lead to internal server errors when
trying access the pull request, this action should be reserved for
Forgejo.
- Do this by utilizing the `update` hook, which process each reference
individually and therefore allow to only skip deleting internal
references and still allow other modifications that is being done in
the same push.
- Ref: https://codeberg.org/Codeberg/Community/issues/1517
2024-03-27 18:27:00 +01:00
..
forgejo
actions.go
admin.go
admin_auth.go
admin_auth_ldap.go
admin_auth_ldap_test.go
admin_auth_oauth.go
admin_auth_stmp.go
admin_regenerate.go
admin_user.go
admin_user_change_password.go
admin_user_create.go
admin_user_delete.go
admin_user_generate_access_token.go
admin_user_list.go
admin_user_must_change_password.go
cert.go
cmd.go
docs.go
doctor.go
doctor_convert.go
doctor_test.go
dump.go
dump_repo.go
embedded.go
generate.go
hook.go
hook_test.go
keys.go
mailer.go
main.go
main_test.go
manager.go
manager_logging.go
migrate.go
migrate_storage.go
migrate_storage_test.go
restore_repo.go
serv.go
web.go
web_acme.go
web_graceful.go
web_https.go