)]}'
{
  "commit": "fc8cd4e1b4d53f6cde6eced21d60f4dc6ad60f73",
  "tree": "2777aac7042cadcda4193b11260e9e973fe7d0ec",
  "parents": [
    "a07e98eba1d09796e4a25216359e57b01d5bc2eb"
  ],
  "author": {
    "name": "David Ostrovsky",
    "email": "david@ostrovsky.org",
    "time": "Thu Oct 01 09:26:13 2026 +0200"
  },
  "committer": {
    "name": "Matthias Sohn",
    "email": "matthias.sohn@sap.com",
    "time": "Wed Nov 04 14:00:58 2026 +0100"
  },
  "message": "Validate protocol v2 ref prefixes and want-refs\n\nProtocol v2 ls-refs accepts a client-supplied ref-prefix, and fetch\naccepts a client-supplied want-ref; both reach the ref database. For\nfile-backed repositories, RefDirectory maps the name to a loose-ref file\npath, so path-traversal components (for example\nrefs/heads/../../../victim.git/refs/private/) let a client read loose\nrefs outside the served repository.\n\nValidate both in the protocol parser, before they reach RefDirectory:\n\n- ref-prefix: complete each prefix to a synthetic full ref name and\n  validate it with Repository.isValidRefName(). Legal partial prefixes\n  pass; traversal is rejected.\n- want-ref: it is a complete ref name, so validate it directly with\n  Repository.isValidRefName(). HEAD is also allowed, since it is a valid\n  want-ref that isValidRefName() rejects as a one-level name.\n\nFor want-ref this mirrors native git\u0027s check_refname_format() gate\nbefore the files backend builds a path. For ref-prefix JGit applies the\nsame validation because its file-backed ls-refs fast path scans loose\nrefs by prefix; native git uses ref-prefix only as a string filter.\n\nAdd a file-backed UploadPack regression test that creates sibling\nrepositories and verifies a traversal ref-prefix is rejected, plus\nProtocolV2Parser tests for valid partial prefixes, traversal and invalid\nprefixes, want-ref HEAD, and a traversal want-ref.\n\nBug: https://gitlab.eclipse.org/security/vulnerability-reports/-/work_items/794\nChange-Id: I9afcca950cfa12d904036da438fe3549fdb0d46a\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "bab4a36cc4bd5ce79ff266e29f49463745fa1c6e",
      "old_mode": 33188,
      "old_path": "org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/ProtocolV2ParserTest.java",
      "new_id": "cce8ec71b1321170fe812d43451013ba5d2d4fc1",
      "new_mode": 33188,
      "new_path": "org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/ProtocolV2ParserTest.java"
    },
    {
      "type": "modify",
      "old_id": "7d5fc61017fedc4a624d184648aacc0a0afd55fd",
      "old_mode": 33188,
      "old_path": "org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/UploadPackLsRefsFileRepositoryTest.java",
      "new_id": "3159723440541add8841ed5d622bf3c315412a9d",
      "new_mode": 33188,
      "new_path": "org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/UploadPackLsRefsFileRepositoryTest.java"
    },
    {
      "type": "modify",
      "old_id": "e437f22d02a85085180ebf800051b434ab8ba201",
      "old_mode": 33188,
      "old_path": "org.eclipse.jgit/src/org/eclipse/jgit/transport/ProtocolV2Parser.java",
      "new_id": "eedcc49fd5fc7ea70e345ef22f8958ad3cfd9e5f",
      "new_mode": 33188,
      "new_path": "org.eclipse.jgit/src/org/eclipse/jgit/transport/ProtocolV2Parser.java"
    }
  ]
}
