1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2025-06-27 16:35:57 +00:00
forgejo/templates
oliverpool c93eb1f927 API: enforce sha requirement on POST /repos/{owner}/{repo}/contents (#8139)
Currently the `POST /repos/{owner}/{repo}/contents` API endpoint accepts request without any `ChangeFileOperation.SHA`, unlike stated by the doc:
33eee199cf/modules/structs/repo_file.go (L80-L81)

This PR adds:
- some more (already passing) tests around this function
- a new (failing) test to show this wrong behavior
- a fix (note that this is a breaking change for clients exploiting this bug)
- an update for all the existing tests

<!--start release-notes-assistant-->

## Release notes
<!--URL:https://codeberg.org/forgejo/forgejo-->
- Breaking bug fixes
  - [PR](https://codeberg.org/forgejo/forgejo/pulls/8139): <!--number 8139 --><!--line 0 --><!--description QVBJOiBlbmZvcmNlIHNoYSByZXF1aXJlbWVudCBvbiBgUE9TVCAvcmVwb3Mve293bmVyfS97cmVwb30vY29udGVudHNg-->API: enforce sha requirement on `POST /repos/{owner}/{repo}/contents`<!--description-->
<!--end release-notes-assistant-->

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/8139
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: oliverpool <git@olivier.pfad.fr>
Co-committed-by: oliverpool <git@olivier.pfad.fr>
2025-06-12 00:13:39 +02:00
..
admin feat!: Abusive content reporting (#6977) 2025-05-18 08:05:16 +00:00
api/packages/pypi Update templates/api/packages/pypi/simple.tmpl 2024-04-12 16:43:30 +00:00
base feat(ui): make JS asset load error message translatable (#7388) 2025-04-01 16:14:38 +00:00
custom [FEAT] Repository flags 2024-02-05 16:09:42 +01:00
devtest chore(ui): clean up hashbox CSS, small design changes (#7822) 2025-05-25 12:51:27 +02:00
explore ui: simplify main-attribute labels 2024-12-08 17:30:52 +05:00
htmx Update module github.com/editorconfig-checker/editorconfig-checker/v2/cmd/editorconfig-checker to v3 2024-08-09 21:03:37 +02:00
mail feat: consider WebAuthn & SSH for instance signing (#7693) 2025-04-29 10:34:07 +00:00
moderation feat!: Abusive content reporting (#6977) 2025-05-18 08:05:16 +00:00
org fix: always render detailed team permissions table in sidebar (#8108) 2025-06-09 10:37:31 +02:00
package feat(ui): improve description in packages settings (#7531) 2025-04-18 12:36:59 +00:00
projects fix(ui): use gap in switch items (#7581) 2025-04-21 04:25:08 +00:00
repo fix: remove download attribute from external assets (#8112) 2025-06-09 10:48:35 +02:00
shared Reimplement editor Tab handling with accessibility safeguards (#6813) 2025-05-25 19:17:03 +02:00
status ui: improve error pages (#7274) 2025-03-28 19:50:43 +00:00
swagger API: enforce sha requirement on POST /repos/{owner}/{repo}/contents (#8139) 2025-06-12 00:13:39 +02:00
user fix: add user visibility description in settings page (#8121) 2025-06-11 09:27:22 +02:00
webhook Actions Failure, Succes, Recover Webhooks (#7508) 2025-06-03 14:29:19 +02:00
home.tmpl Split Forgejo landing page template to allow patching or removing Forgejo introduction section (#6675) 2025-02-03 08:41:52 +00:00
home_forgejo.tmpl Split Forgejo landing page template to allow patching or removing Forgejo introduction section (#6675) 2025-02-03 08:41:52 +00:00
install.tmpl Added alt's to <img> 2025-01-31 21:22:00 +00:00
post-install.tmpl [BRANDING] Custom loading animation for Forgejo 2024-02-05 16:02:13 +01:00