1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2025-07-28 14:09:38 +02:00

[v11.0/forgejo] fix: parse change-id in the git commit header (#7887)

**Backport:** https://codeberg.org/forgejo/forgejo/pulls/7884

- `change-id` is a commit header set by [jj-vcs](https://jj-vcs.github.io/jj/). Modify the commit parser to consider this header to be a valid header, this in turn fixes the signature validation on git commits that contain this header.
- Resolves forgejo/forgejo#7836
- Added unit test.

Co-authored-by: Gusted <postmaster@gusted.xyz>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7887
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: forgejo-backport-action <forgejo-backport-action@noreply.codeberg.org>
Co-committed-by: forgejo-backport-action <forgejo-backport-action@noreply.codeberg.org>
This commit is contained in:
forgejo-backport-action 2025-05-16 21:46:24 +00:00 committed by Gusted
parent bdef19f62b
commit a821eb9e0f
2 changed files with 51 additions and 0 deletions

View file

@ -85,6 +85,8 @@ readLoop:
_, _ = payloadSB.Write(line)
case "encoding":
_, _ = payloadSB.Write(line)
case "change-id": // jj-vcs specific header.
_, _ = payloadSB.Write(line)
case "gpgsig":
fallthrough
case "gpgsig-sha256": // FIXME: no intertop, so only 1 exists at present.