summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'stable-4.8' into stable-4.9Matthias Sohn2018-12-242-14/+10
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.8: Prepare 4.7.8-SNAPSHOT builds JGit v4.7.7.201812240805-r Fix feature versions imported by feature org.eclipse.jgit.pgm Prepare 4.5.6-SNAPSHOT builds JGit v4.5.5.201812240535-r Call AdvertiseRefsHook before validating wants Change-Id: Ib44e314a68bca2349b45f4937257aa1298c8d74b Signed-off-by: Jonathan Nieder <jrn@google.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Merge branch 'stable-4.7' into stable-4.8Matthias Sohn2018-12-241-13/+9
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.7: Prepare 4.7.8-SNAPSHOT builds JGit v4.7.7.201812240805-r Fix feature versions imported by feature org.eclipse.jgit.pgm Prepare 4.5.6-SNAPSHOT builds JGit v4.5.5.201812240535-r Call AdvertiseRefsHook before validating wants Change-Id: I68a21067705b580b40840f8039001ff1e5273c15 Signed-off-by: Jonathan Nieder <jrn@google.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | * Prepare 4.7.8-SNAPSHOT buildsMatthias Sohn2018-12-2457-324/+324
| | | | | | | | | | | | Change-Id: Ic4ab4aae6d87392d1a5a8bbda06384b7a5b64182 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | * JGit v4.7.7.201812240805-rv4.7.7.201812240805-rMatthias Sohn2018-12-2456-59/+59
| | | | | | | | | | | | | | | Change-Id: I57b6001b1fbd6042299ccd4dd7d70765a46ea10b Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | * Merge branch 'stable-4.6' into stable-4.7Matthias Sohn2018-12-242-15/+11
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.6: Fix feature versions imported by feature org.eclipse.jgit.pgm Prepare 4.5.6-SNAPSHOT builds JGit v4.5.5.201812240535-r Call AdvertiseRefsHook before validating wants Change-Id: If637694f80dbd1e774d60c672fe78a6500650bb8 Signed-off-by: Jonathan Nieder <jrn@google.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | * Fix feature versions imported by feature org.eclipse.jgit.pgmMatthias Sohn2018-12-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | On stable-4.6 we are currently at version 4.6.2-SNAPSHOT Change-Id: Ia2972d0697c3476850ecf4a3c6691b3987866cd9 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | * Merge branch 'stable-4.5' into stable-4.6Matthias Sohn2018-12-241-13/+9
| | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.5: Prepare 4.5.6-SNAPSHOT builds JGit v4.5.5.201812240535-r Call AdvertiseRefsHook before validating wants Change-Id: I0fd67ddd9c4966c20d82cdfe78b2f9d4898b4665 Signed-off-by: Jonathan Nieder <jrn@google.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | * Prepare 4.5.6-SNAPSHOT buildsMatthias Sohn2018-12-2456-302/+302
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I57c55187ada6d824b94a17f5a79a5bcff61f9ee9 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | * JGit v4.5.5.201812240535-rv4.5.5.201812240535-rMatthias Sohn2018-12-2456-59/+59
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I6e89e937c08757887967d91afb39cfbe8372d6b5 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | * Call AdvertiseRefsHook before validating wantsMasaya Suzuki2018-12-241-13/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | AdvertiseRefsHook is used to limit the visibility of the refs in Gerrit. If this hook is not called, then all refs are treated as visible, causing the server to serve commits reachable from branches the client should not be able to access, if asked to via a request naming a guessed object id. This bug was introduced in v2.0.0.201206130900-r~123 (Modify refs in UploadPack/ReceivePack using a hook interface, 2012-02-08). Stateful bidirectional transports are not affected. Fix it by moving the AdvertiseRefsHook call to getAdvertisedOrDefaultRefs, ensuring the hook is called in all cases. [jn: backported to stable-4.5 by splitting out tests and the protocol v2 specific parts] Change-Id: I159f396216354f2eda3968d17802e166d8c8ec2d Signed-off-by: Masaya Suzuki <masayasuzuki@google.com> Signed-off-by: Jonathan Nieder <jrn@google.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | | Prepare 4.9.8-SNAPSHOT buildsMatthias Sohn2018-10-2056-333/+333
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Iab7b0f2a21a76f801a83fbeb54f09d1525878f4d Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | | JGit v4.9.7.201810191756-rv4.9.7.201810191756-rMatthias Sohn2018-10-1956-59/+59
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ib980731eb9ec7f4c92deac9b4cf2f7a994d670c2 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | | Update API problem filterMatthias Sohn2018-10-191-1/+1
| | | | | | | | | | | | | | | | | | | | Change-Id: Iba8650900d3936edccbe30de9d3eafd4f9e0dba6 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | | Merge branch 'stable-4.8' into stable-4.9Matthias Sohn2018-10-191-1/+6
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.8: Prepare 4.7.7-SNAPSHOT builds JGit v4.7.6.201810191618-r Update API problem filter Fix file handle leak in ObjectDownloadListener.onWritePossible Replace Findbugs with Spotbugs in org.eclipse.jgit/pom.xml Replace FindBugs with SpotBugs Prepare 4.4.2-SNAPSHOT builds JGit v4.0.3.201509231615-r Change-Id: Ic18af2ddcba8f7a53eb27a33ea9f637adb941993 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | | | Merge branch 'stable-4.7' into stable-4.8Matthias Sohn2018-10-191-1/+6
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.7: Prepare 4.7.7-SNAPSHOT builds JGit v4.7.6.201810191618-r Update API problem filter Fix file handle leak in ObjectDownloadListener.onWritePossible Replace Findbugs with Spotbugs in org.eclipse.jgit/pom.xml Replace FindBugs with SpotBugs Prepare 4.4.2-SNAPSHOT builds JGit v4.0.3.201509231615-r Change-Id: I783a083c0092a400f28f7977fbc4e556af88c8de
| | * | | Prepare 4.7.7-SNAPSHOT buildsMatthias Sohn2018-10-1956-321/+321
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I131e40cbbf32bc75d2ed24ca31ba3613a3bbca25 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | * | | JGit v4.7.6.201810191618-rv4.7.6.201810191618-rMatthias Sohn2018-10-1956-59/+59
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Iaee27d5e2de016240f1a0940653fef82c6044a1d Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | * | | Update API problem filterMatthias Sohn2018-10-191-1/+1
| | | | | | | | | | | | | | | | | | | | Change-Id: I66c0c490bb66adafac5d670d2d9571f1674a281e Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | * | | Merge branch 'stable-4.6' into stable-4.7David Pursehouse2018-10-190-0/+0
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.6: Prepare 4.4.2-SNAPSHOT builds JGit v4.0.3.201509231615-r Change-Id: I3e1a870a225447e761368298ce9b65dbec2c2a82 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
| | | * | Merge branch 'stable-4.5' into stable-4.6David Pursehouse2018-10-190-0/+0
| | | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.5: Prepare 4.4.2-SNAPSHOT builds JGit v4.0.3.201509231615-r Change-Id: I9c925a65d42559443ade9ac8291ffe00f4a1dda1 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
| | | | * Merge branch 'stable-4.4' into stable-4.5David Pursehouse2018-10-190-0/+0
| | | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.4: Prepare 4.4.2-SNAPSHOT builds JGit v4.0.3.201509231615-r Change-Id: Icd66a796b0cce93c75a52cc77fec8f9df3eeccb4 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
| | | | | * Merge branch 'stable-4.3' into stable-4.4stable-4.4David Pursehouse2018-10-190-0/+0
| | | | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.3: JGit v4.0.3.201509231615-r Change-Id: I147d81a9cc9c0f9e66084897df9c88c369539db7 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
| | | | | | * Merge branch 'stable-4.2' into stable-4.3stable-4.3David Pursehouse2018-10-190-0/+0
| | | | | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.2: JGit v4.0.3.201509231615-r Change-Id: Ic90ef74497afee9da4b49dcb53302b4efa5b9f26 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
| | | | | | | * Merge branch 'stable-4.1' into stable-4.2stable-4.2David Pursehouse2018-10-190-0/+0
| | | | | | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.1: JGit v4.0.3.201509231615-r Change-Id: I6cc5bcefad2e8dee3394770d36608f981bfc9a9e Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
| | | | | | | | * Merge branch 'stable-4.0' into stable-4.1stable-4.1David Pursehouse2018-10-190-0/+0
| | | | | | | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.0: JGit v4.0.3.201509231615-r Change-Id: Ie74b0392ef145ffd27dc903c45f7fec2d4492a17 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
| | | | | | | | | * JGit v4.0.3.201509231615-rv4.0.3.201509231615-rstable-4.0Matthias Sohn2015-09-2346-49/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I7ec09e82d806cde61165a6ceb79de022f18d9fe2 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | | * | | | | Prepare 4.4.2-SNAPSHOT buildsMatthias Sohn2016-07-1556-302/+302
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I1d75fb5bddb1a6dd23604ba57c9798c978afca89 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | * | | | | | | | Fix file handle leak in ObjectDownloadListener.onWritePossibleMatthias Sohn2018-10-131-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5c134f4d removed closing the input stream when we reached end of the stream. This caused file handle leaks. Bug: 540049 Change-Id: I48082b537077c7471fc160f59aa04deb99687d9b Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | * | | | | | | | Merge branch 'stable-4.6' into stable-4.7David Pursehouse2018-10-132-11/+11
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.6: Replace Findbugs with Spotbugs in org.eclipse.jgit/pom.xml Replace FindBugs with SpotBugs Change-Id: I24417e4ebbba31f7ff6896d585ef807327411392 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
| | | * | | | | | | Merge branch 'stable-4.5' into stable-4.6David Pursehouse2018-10-132-10/+11
| | | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.5: Replace Findbugs with Spotbugs in org.eclipse.jgit/pom.xml Replace FindBugs with SpotBugs Change-Id: I1c077e8f3530ac717b1603d3307fd15d4335b8fe Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
| | | | * | | | | | Replace Findbugs with Spotbugs in org.eclipse.jgit/pom.xmlDavid Pursehouse2018-10-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: If9cb0de7a0e7bd95eac7daeee140a18385192a48 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
| | | | * | | | | | Replace FindBugs with SpotBugsDavid Pursehouse2018-10-091-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SpotBugs [1] is the spiritual successor of FindBugs, carrying on from the point where it left off with support of its community. This is a backport of [1] which originally did the replacement on the master branch. This change updates to the current latest version, so that we can get the benefit of its checks when pushing changes to the stable branches. [1] https://spotbugs.github.io/ [2] https://git.eclipse.org/r/#/c/101312/ Change-Id: Ib73d56b5980b55f4d7e09d87abec3138cac3d3dc Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | | | | | | | | | Merge branch 'stable-4.8' into stable-4.9Jonathan Nieder2018-10-081-1/+0
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.8: SubmoduleValidator: Remove unused import of ConfigConstants Change-Id: Id01fd9945e23a9343f96c42db89d5a1b302dad33 Signed-off-by: Jonathan Nieder <jrn@google.com>
| * | | | | | | | | Merge branch 'stable-4.7' into stable-4.8Jonathan Nieder2018-10-081-1/+0
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.7: SubmoduleValidator: Remove unused import of ConfigConstants Change-Id: I6a7d19602d6d9099928ee52de727743b9717f262 Signed-off-by: Jonathan Nieder <jrn@google.com>
| | * | | | | | | | SubmoduleValidator: Remove unused import of ConfigConstantsDavid Pursehouse2018-10-091-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I6afe5690bf9d1f1f4d414aa618daefc8b48d217e Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | | | | | | | | | Merge branch 'stable-4.8' into stable-4.9Jonathan Nieder2018-10-081-11/+16
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.8: SubmoduleValidator: Permit missing path or url Change-Id: I989ac2c0c124c82385fc7cac7e0544ec225f7589 Signed-off-by: Jonathan Nieder <jrn@google.com>
| * | | | | | | | | Merge branch 'stable-4.7' into stable-4.8Jonathan Nieder2018-10-081-11/+16
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.7: SubmoduleValidator: Permit missing path or url Change-Id: I94fdaf45abbf7665f9eddc14b1a7f7144aafeadf Signed-off-by: Jonathan Nieder <jrn@google.com>
| | * | | | | | | | SubmoduleValidator: Permit missing path or urlJonathan Nieder2018-10-081-11/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A .gitmodules file can include a submodule without a path to configure the URL for a submodule that is only present on other branches. A .gitmodules file can include a submodule with no URL and no path to reserve the name for a submodule that existed in earlier history but is not available from any URL any more. "git fsck" permits both of these cases. Permit them in JGit as well (instead of throwing NullPointerException). Change-Id: I3b442639ad79ea7a59227f96406a12e62d3573ae Reported-by: David Pursehouse <david.pursehouse@gmail.com> Signed-off-by: Jonathan Nieder <jrn@google.com>
* | | | | | | | | | Merge branch 'stable-4.8' into stable-4.9Jonathan Nieder2018-10-071-2/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.8: ObjectChecker#getGitsubmodules: Fix malformed javadoc Change-Id: Ic73df5571e1ae86e5e026d0bf9d8e9e330cbfa97 Signed-off-by: Jonathan Nieder <jrn@google.com>
| * | | | | | | | | Merge branch 'stable-4.7' into stable-4.8David Pursehouse2018-10-071-2/+2
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.7: ObjectChecker#getGitsubmodules: Fix malformed javadoc Change-Id: I51ddd8fa1c2fbcabfb010bc4662d2c925563b55a Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
| | * | | | | | | | ObjectChecker#getGitsubmodules: Fix malformed javadocDavid Pursehouse2018-10-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The text "<tree, blob>" with angle brackets should not be used in javadoc since it is interpreted as an HTML tag and then rejected since it's not a valid HTML tag. Wrap the text in a @literal tag. Also add a missing space. Change-Id: Ide045e8c04a39a916f5b2e964e58c151e4555830 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | | | | | | | | | Prepare 4.9.7-SNAPSHOT buildsMatthias Sohn2018-10-0656-333/+333
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I20e7bd6bdebcdb55a8c771314759bd8f98f04ef6 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | | | | | | | JGit v4.9.6.201810051924-rv4.9.6.201810051924-rMatthias Sohn2018-10-0656-59/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ib39aaae26da17aa37d654b24c1defd45126f4ea2 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | | | | | | | Merge branch 'stable-4.8' into stable-4.9Matthias Sohn2018-10-0611-10/+683
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.8: Prepare 4.7.6-SNAPSHOT builds JGit v4.7.5.201810051826-r BaseReceivePack: Validate incoming .gitmodules files ObjectChecker: Report .gitmodules files found in the pack SubmoduleAddCommand: Reject submodule URIs that look like cli options Change-Id: Ia7a826399d8d5b8a0eb7169b40e98a6f5c207a4c Signed-off-by: Jonathan Nieder <jrn@google.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | | | | | | | | Merge branch 'stable-4.7' into stable-4.8Matthias Sohn2018-10-0611-10/+683
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.7: Prepare 4.7.6-SNAPSHOT builds JGit v4.7.5.201810051826-r BaseReceivePack: Validate incoming .gitmodules files ObjectChecker: Report .gitmodules files found in the pack SubmoduleAddCommand: Reject submodule URIs that look like cli options Change-Id: Id6fabec4d0b682a7e20a46e88cbc05432efca062 Signed-off-by: Jonathan Nieder <jrn@google.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | * | | | | | | | Prepare 4.7.6-SNAPSHOT buildsMatthias Sohn2018-10-0656-321/+321
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I99b59116999742d8d6cdba26287ea7c6eba11a30 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | * | | | | | | | JGit v4.7.5.201810051826-rv4.7.5.201810051826-rMatthias Sohn2018-10-0656-59/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I60c7a2eff3dab5083f71df0d9465a4e94b5e2513 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | * | | | | | | | BaseReceivePack: Validate incoming .gitmodules filesIvan Frade2018-10-055-1/+130
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The main concern are submodule urls starting with '-' that could pass as options to an unguarded tool. Pass through the parser the ids of blobs identified as .gitmodules files in the ObjectChecker. Load the blobs and parse/validate them in SubmoduleValidator. Change-Id: Ia0cc32ce020d288f995bf7bc68041fda36be1963 Signed-off-by: Ivan Frade <ifrade@google.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | * | | | | | | | ObjectChecker: Report .gitmodules files found in the packIvan Frade2018-10-054-7/+362
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to validate .gitmodules files, we first need to find them in the incoming pack. Do it in the ObjectChecker stage. Check in the tree objects if they point to a .gitmodules file and report the tree id and the .gitmodules blob id. This can be used later to check if the file is in the root of the project and if the contents are good. While we're here, make isMacHFSGit more accurate by detecting variants of filenames that vary in case. [jn: tweaked NTFS and HFS+ checking; added more tests] Change-Id: I70802e7d2c1374116149de4f89836b9498f39582 Signed-off-by: Ivan Frade <ifrade@google.com> Signed-off-by: Jonathan Nieder <jrn@google.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | * | | | | | | | SubmoduleAddCommand: Reject submodule URIs that look like cli optionsIvan Frade2018-10-056-3/+192
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In C git versions before 2.19.1, the submodule is fetched by running "git clone <uri> <path>". A URI starting with "-" would be interpreted as an option, causing security problems. See CVE-2018-17456. Refuse to add submodules with URIs, names or paths starting with "-", that could be confused with command line arguments. [jn: backported to JGit 4.7.y, bringing portions of Masaya Suzuki's dotdot check code in v5.1.0.201808281540-m3~57 (Add API to specify the submodule name, 2018-07-12) along for the ride] Change-Id: I2607c3acc480b75ab2b13386fe2cac435839f017 Signed-off-by: Ivan Frade <ifrade@google.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>