)]}'
{
  "commit": "bffc762f87ae8d18c6001bf0044a76004245754c",
  "tree": "94ef671b634c0516c9643aa5e685ca31c0793453",
  "parents": [
    "cf8f6ce02a13f4d1979a53241afbee15a293fce9"
  ],
  "author": {
    "name": "Taylor Blau",
    "email": "me@ttaylorr.com",
    "time": "Tue Jan 24 19:43:51 2023 -0500"
  },
  "committer": {
    "name": "Junio C Hamano",
    "email": "gitster@pobox.com",
    "time": "Tue Jan 24 16:52:16 2023 -0800"
  },
  "message": "dir-iterator: prevent top-level symlinks without FOLLOW_SYMLINKS\n\nWhen using the dir_iterator API, we first stat(2) the base path, and\nthen use that as a starting point to enumerate the directory\u0027s contents.\n\nIf the directory contains symbolic links, we will immediately die() upon\nencountering them without the `FOLLOW_SYMLINKS` flag. The same is not\ntrue when resolving the top-level directory, though.\n\nAs explained in a previous commit, this oversight in 6f054f9fb3\n(builtin/clone.c: disallow `--local` clones with symlinks, 2022-07-28)\ncan be used as an attack vector to include arbitrary files on a victim\u0027s\nfilesystem from outside of the repository.\n\nPrevent resolving top-level symlinks unless the FOLLOW_SYMLINKS flag is\ngiven, which will cause clones of a repository with a symlink\u0027d\n\"$GIT_DIR/objects\" directory to fail.\n\nSigned-off-by: Taylor Blau \u003cme@ttaylorr.com\u003e\nSigned-off-by: Junio C Hamano \u003cgitster@pobox.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "b17e9f970a747a3ac85aae81a92c38d2a6491546",
      "old_mode": 33188,
      "old_path": "dir-iterator.c",
      "new_id": "3764dd81a185b296a5d4c0a9fc8c0ae2bd4085ec",
      "new_mode": 33188,
      "new_path": "dir-iterator.c"
    },
    {
      "type": "modify",
      "old_id": "08229157c638040cb19f7dd32b680fbea45f3965",
      "old_mode": 33188,
      "old_path": "dir-iterator.h",
      "new_id": "e3b6ff28007366568d981631d5b312bd849486c0",
      "new_mode": 33188,
      "new_path": "dir-iterator.h"
    },
    {
      "type": "modify",
      "old_id": "92910e4e6c13ce381dddefcf197dea26a07efd88",
      "old_mode": 33261,
      "old_path": "t/t0066-dir-iterator.sh",
      "new_id": "c826f60f6d6f897a1151f4ce39e35c88297a25e2",
      "new_mode": 33261,
      "new_path": "t/t0066-dir-iterator.sh"
    },
    {
      "type": "modify",
      "old_id": "9d32f1c4a4962c50d22a3f51dc752dd96278faf9",
      "old_mode": 33261,
      "old_path": "t/t5604-clone-reference.sh",
      "new_id": "4ff21d7ccf3f4106d8b6ae1c13baed5e4747ca80",
      "new_mode": 33261,
      "new_path": "t/t5604-clone-reference.sh"
    }
  ]
}
