{"push_id":2935918873,"size":18,"distinct_size":0,"ref":"refs/heads/jk/credential-interactive","head":"912dc395574be0698e7f622077f1a0f6f76e99a6","before":"566d409685a3da1a604f7c4694125513367516b8","commits":[{"sha":"98afac7a7cefdca0d2c4917dd8066a59f7088265","author":{"name":"Jeff King","email":"696e3fbcf235d40b6ea1ebd61c87cbea79d444e7@peff.net"},"message":"submodule--helper: use \"--\" to signal end of clone options\n\nWhen we clone a submodule, we call \"git clone $url $path\".\nBut there's nothing to say that those components can't begin\nwith a dash themselves, confusing git-clone into thinking\nthey're options. Let's pass \"--\" to make it clear what we\nexpect.\n\nThere's no test here, because it's actually quite hard to\nmake these names work, even with \"git clone\" parsing them\ncorrectly. And we're going to restrict these cases even\nfurther in future commits. So we'll leave off testing until\nthen; this is just the minimal fix to prevent us from doing\nsomething stupid with a badly formed entry.\n\nReported-by: joernchen <joernchen@phenoelit.de>\nSigned-off-by: Jeff King <peff@peff.net>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/peff/git/commits/98afac7a7cefdca0d2c4917dd8066a59f7088265"},{"sha":"f6adec4e329ef0e25e14c63b735a5956dc67b8bc","author":{"name":"Jeff King","email":"696e3fbcf235d40b6ea1ebd61c87cbea79d444e7@peff.net"},"message":"submodule-config: ban submodule urls that start with dash\n\nThe previous commit taught the submodule code to invoke our\n\"git clone $url $path\" with a \"--\" separator so that we\naren't confused by urls or paths that start with dashes.\n\nHowever, that's just one code path. It's not clear if there\nare others, and it would be an easy mistake to add one in\nthe future. Moreover, even with the fix in the previous\ncommit, it's quite hard to actually do anything useful with\nsuch an entry. Any url starting with a dash must fall into\none of three categories:\n\n - it's meant as a file url, like \"-path\". But then any\n   clone is not going to have the matching path, since it's\n   by definition relative inside the newly created clone. If\n   you spell it as \"./-path\", the submodule code sees the\n   \"/\" and translates this to an absolute path, so it at\n   least works (assuming the receiver has the same\n   filesystem layout as you). But that trick does not apply\n   for a bare \"-path\".\n\n - it's meant as an ssh url, like \"-host:path\". But this\n   already doesn't work, as we explicitly disallow ssh\n   hostnames that begin with a dash (to avoid option\n   injection against ssh).\n\n - it's a remote-helper scheme, like \"-scheme::data\". This\n   _could_ work if the receiver bends over backwards and\n   creates a funny-named helper like \"git-remote--scheme\".\n   But normally there would not be any helper that matches.\n\nSince such a url does not work today and is not likely to do\nanything useful in the future, let's simply disallow them\nentirely. That protects the existing \"git clone\" path (in a\nbelt-and-suspenders way), along with any others that might\nexist.\n\nOur tests cover two cases:\n\n  1. A file url with \"./\" continues to work, showing that\n     there's an escape hatch for people with truly silly\n     repo names.\n\n  2. A url starting with \"-\" is rejected.\n\nNote that we expect case (2) to fail, but it would have done\nso even without this commit, for the reasons given above.\nSo instead of just expecting failure, let's also check for\nthe magic word \"ignoring\" on stderr. That lets us know that\nwe failed for the right reason.\n\nSigned-off-by: Jeff King <peff@peff.net>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/peff/git/commits/f6adec4e329ef0e25e14c63b735a5956dc67b8bc"},{"sha":"273c61496f88c6495b886acb1041fe57965151da","author":{"name":"Jeff King","email":"696e3fbcf235d40b6ea1ebd61c87cbea79d444e7@peff.net"},"message":"submodule-config: ban submodule paths that start with a dash\n\nWe recently banned submodule urls that look like\ncommand-line options. This is the matching change to ban\nleading-dash paths.\n\nAs with the urls, this should not break any use cases that\ncurrently work. Even with our \"--\" separator passed to\ngit-clone, git-submodule.sh gets confused. Without the code\nportion of this patch, the clone of \"-sub\" added in t7417\nwould yield results like:\n\n    /path/to/git-submodule: 410: cd: Illegal option -s\n    /path/to/git-submodule: 417: cd: Illegal option -s\n    /path/to/git-submodule: 410: cd: Illegal option -s\n    /path/to/git-submodule: 417: cd: Illegal option -s\n    Fetched in submodule path '-sub', but it did not contain b56243f8f4eb91b2f1f8109452e659f14dd3fbe4. Direct fetching of that commit failed.\n\nMoreover, naively adding such a submodule doesn't work:\n\n  $ git submodule add $url -sub\n  The following path is ignored by one of your .gitignore files:\n  -sub\n\neven though there is no such ignore pattern (the test script\nhacks around this with a well-placed \"git mv\").\n\nUnlike leading-dash urls, though, it's possible that such a\npath _could_ be useful if we eventually made it work. So\nthis commit should be seen not as recommending a particular\npolicy, but rather temporarily closing off a broken and\npossibly dangerous code-path. We may revisit this decision\nlater.\n\nThere are two minor differences to the tests in t7416 (that\ncovered urls):\n\n  1. We don't have a \"./-sub\" escape hatch to make this\n     work, since the submodule code expects to be able to\n     match canonical index names to the path field (so you\n     are free to add submodule config with that path, but we\n     would never actually use it, since an index entry would\n     never start with \"./\").\n\n  2. After this patch, cloning actually succeeds. Since we\n     ignore the submodule.*.path value, we fail to find a\n     config stanza for our submodule at all, and simply\n     treat it as inactive. We still check for the \"ignoring\"\n     message.\n\nSigned-off-by: Jeff King <peff@peff.net>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/peff/git/commits/273c61496f88c6495b886acb1041fe57965151da"},{"sha":"d0832b2847aa9669c09397c5639d7fe56abaf9fc","author":{"name":"Junio C Hamano","email":"a6723cc3f76163bf7adb636a73ac3b0ceb3e6b9b@pobox.com"},"message":"Git 2.14.5\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/peff/git/commits/d0832b2847aa9669c09397c5639d7fe56abaf9fc"},{"sha":"902df9f5c45cd99720d4ca0a38d0538eb0126ad7","author":{"name":"Junio C Hamano","email":"a6723cc3f76163bf7adb636a73ac3b0ceb3e6b9b@pobox.com"},"message":"Sync with Git 2.14.4\n\n* maint-2.14:\n  Git 2.14.5\n  submodule-config: ban submodule paths that start with a dash\n  submodule-config: ban submodule urls that start with dash\n  submodule--helper: use \"--\" to signal end of clone options","distinct":false,"url":"https://api.github.com/repos/peff/git/commits/902df9f5c45cd99720d4ca0a38d0538eb0126ad7"},{"sha":"924c623e1c71b98da608f980a97f9730c021ba44","author":{"name":"Junio C Hamano","email":"a6723cc3f76163bf7adb636a73ac3b0ceb3e6b9b@pobox.com"},"message":"Git 2.15.3\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/peff/git/commits/924c623e1c71b98da608f980a97f9730c021ba44"},{"sha":"424aac653acce98f1bfb7f8b7bf36361f558472d","author":{"name":"Junio C Hamano","email":"a6723cc3f76163bf7adb636a73ac3b0ceb3e6b9b@pobox.com"},"message":"Sync with 2.15.3\n\n* maint-2.15:\n  Git 2.15.3\n  Git 2.14.5\n  submodule-config: ban submodule paths that start with a dash\n  submodule-config: ban submodule urls that start with dash\n  submodule--helper: use \"--\" to signal end of clone options","distinct":false,"url":"https://api.github.com/repos/peff/git/commits/424aac653acce98f1bfb7f8b7bf36361f558472d"},{"sha":"27d05d1a1a62273aa3749f4d0ab8a126ef11ff66","author":{"name":"Junio C Hamano","email":"a6723cc3f76163bf7adb636a73ac3b0ceb3e6b9b@pobox.com"},"message":"Git 2.16.5\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/peff/git/commits/27d05d1a1a62273aa3749f4d0ab8a126ef11ff66"},{"sha":"e43aab778c72250e11eb00e31dc6be90072a1637","author":{"name":"Junio C Hamano","email":"a6723cc3f76163bf7adb636a73ac3b0ceb3e6b9b@pobox.com"},"message":"Sync with 2.16.5\n\n* maint-2.16:\n  Git 2.16.5\n  Git 2.15.3\n  Git 2.14.5\n  submodule-config: ban submodule paths that start with a dash\n  submodule-config: ban submodule urls that start with dash\n  submodule--helper: use \"--\" to signal end of clone options","distinct":false,"url":"https://api.github.com/repos/peff/git/commits/e43aab778c72250e11eb00e31dc6be90072a1637"},{"sha":"a124133e1e6ab5c7a9fef6d0e6bcb084e3455b46","author":{"name":"Jeff King","email":"696e3fbcf235d40b6ea1ebd61c87cbea79d444e7@peff.net"},"message":"fsck: detect submodule urls starting with dash\n\nUrls with leading dashes can cause mischief on older\nversions of Git. We should detect them so that they can be\nrejected by receive.fsckObjects, preventing modern versions\nof git from being a vector by which attacks can spread.\n\nSigned-off-by: Jeff King <peff@peff.net>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/peff/git/commits/a124133e1e6ab5c7a9fef6d0e6bcb084e3455b46"},{"sha":"1a7fd1fb2998002da6e9ff2ee46e1bdd25ee8404","author":{"name":"Jeff King","email":"696e3fbcf235d40b6ea1ebd61c87cbea79d444e7@peff.net"},"message":"fsck: detect submodule paths starting with dash\n\nAs with urls, submodule paths with dashes are ignored by\ngit, but may end up confusing older versions. Detecting them\nvia fsck lets us prevent modern versions of git from being a\nvector to spread broken .gitmodules to older versions.\n\nCompared to blocking leading-dash urls, though, this\ndetection may be less of a good idea:\n\n  1. While such paths provide confusing and broken results,\n     they don't seem to actually work as option injections\n     against anything except \"cd\". In particular, the\n     submodule code seems to canonicalize to an absolute\n     path before running \"git clone\" (so it passes\n     /your/clone/-sub).\n\n  2. It's more likely that we may one day make such names\n     actually work correctly. Even after we revert this fsck\n     check, it will continue to be a hassle until hosting\n     servers are all updated.\n\nOn the other hand, it's not entirely clear that the behavior\nin older versions is safe. And if we do want to eventually\nallow this, we may end up doing so with a special syntax\nanyway (e.g., writing \"./-sub\" in the .gitmodules file, and\nteaching the submodule code to canonicalize it when\ncomparing).\n\nSo on balance, this is probably a good protection.\n\nSigned-off-by: Jeff King <peff@peff.net>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/peff/git/commits/1a7fd1fb2998002da6e9ff2ee46e1bdd25ee8404"},{"sha":"6e9e91e9cae74cd7feb9300563d40361b2b17dd2","author":{"name":"Junio C Hamano","email":"a6723cc3f76163bf7adb636a73ac3b0ceb3e6b9b@pobox.com"},"message":"Git 2.17.2\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/peff/git/commits/6e9e91e9cae74cd7feb9300563d40361b2b17dd2"},{"sha":"44f87dac99574a8073ffb1ba8b10bd4d3945f61b","author":{"name":"Junio C Hamano","email":"a6723cc3f76163bf7adb636a73ac3b0ceb3e6b9b@pobox.com"},"message":"Sync with 2.17.2\n\n* maint-2.17:\n  Git 2.17.2\n  fsck: detect submodule paths starting with dash\n  fsck: detect submodule urls starting with dash\n  Git 2.16.5\n  Git 2.15.3\n  Git 2.14.5\n  submodule-config: ban submodule paths that start with a dash\n  submodule-config: ban submodule urls that start with dash\n  submodule--helper: use \"--\" to signal end of clone options","distinct":false,"url":"https://api.github.com/repos/peff/git/commits/44f87dac99574a8073ffb1ba8b10bd4d3945f61b"},{"sha":"268fbcd172cdb306e8a3e7143cc16677c963d6cd","author":{"name":"Junio C Hamano","email":"a6723cc3f76163bf7adb636a73ac3b0ceb3e6b9b@pobox.com"},"message":"Git 2.18.1\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/peff/git/commits/268fbcd172cdb306e8a3e7143cc16677c963d6cd"},{"sha":"1958ad504befa6a09c475cc8ab9de43b359de137","author":{"name":"Junio C Hamano","email":"a6723cc3f76163bf7adb636a73ac3b0ceb3e6b9b@pobox.com"},"message":"Sync with 2.18.1\n\n* maint-2.18:\n  Git 2.18.1\n  Git 2.17.2\n  fsck: detect submodule paths starting with dash\n  fsck: detect submodule urls starting with dash\n  Git 2.16.5\n  Git 2.15.3\n  Git 2.14.5\n  submodule-config: ban submodule paths that start with a dash\n  submodule-config: ban submodule urls that start with dash\n  submodule--helper: use \"--\" to signal end of clone options","distinct":false,"url":"https://api.github.com/repos/peff/git/commits/1958ad504befa6a09c475cc8ab9de43b359de137"},{"sha":"cae598d9980661a978e2df4fb338518f7bf09572","author":{"name":"Junio C Hamano","email":"a6723cc3f76163bf7adb636a73ac3b0ceb3e6b9b@pobox.com"},"message":"Git 2.19.1\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/peff/git/commits/cae598d9980661a978e2df4fb338518f7bf09572"},{"sha":"f84b9b09d40408cf91bbc500d9f190a7866c3e0f","author":{"name":"Junio C Hamano","email":"a6723cc3f76163bf7adb636a73ac3b0ceb3e6b9b@pobox.com"},"message":"Sync with 2.19.1\n\n* maint:\n  Git 2.19.1\n  Git 2.18.1\n  Git 2.17.2\n  fsck: detect submodule paths starting with dash\n  fsck: detect submodule urls starting with dash\n  Git 2.16.5\n  Git 2.15.3\n  Git 2.14.5\n  submodule-config: ban submodule paths that start with a dash\n  submodule-config: ban submodule urls that start with dash\n  submodule--helper: use \"--\" to signal end of clone options","distinct":false,"url":"https://api.github.com/repos/peff/git/commits/f84b9b09d40408cf91bbc500d9f190a7866c3e0f"},{"sha":"912dc395574be0698e7f622077f1a0f6f76e99a6","author":{"name":"Jeff King","email":"696e3fbcf235d40b6ea1ebd61c87cbea79d444e7@peff.net"},"message":"wip","distinct":false,"url":"https://api.github.com/repos/peff/git/commits/912dc395574be0698e7f622077f1a0f6f76e99a6"}]}
{"actor":{"display_login":"peff"}}