aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.test/META-INF
diff options
context:
space:
mode:
authorRobin Rosenberg <robin.rosenberg@dewire.com>2012-04-23 22:37:50 +0200
committerMatthias Sohn <matthias.sohn@sap.com>2012-04-23 22:37:50 +0200
commit42d7565ba9b97effdee3f737e32541b26b7341ab (patch)
tree397809a3509520df69cb068791585cf1a77637d9 /org.eclipse.jgit.test/META-INF
parent9c5b31703f278c510bec64fa7a822713feaca6f2 (diff)
downloadjgit-42d7565ba9b97effdee3f737e32541b26b7341ab.tar.gz
jgit-42d7565ba9b97effdee3f737e32541b26b7341ab.zip
Validate paths during DirCheckout
DirCacheCheckout and CanonicalTreeParser cooperate. CanonicalTreeParser can detect malformed, potentially malicious tree entries and sets a flag, while DirCacheCheckout refuses to work with such paths. Malicious tree entries are ".", "..", ".git" (case insensitive), any name containing '/' and (on Windows '\') and also (on Windows) any paths ending in a combination of '.' or space or containing a ':'. We also forbid all special names like "con" etc on Windows. Some of the test can execute on any platform by enabling partial platform emulation. A new runtime exception, InvalidPathException, is introduced. For backwards compatibility it extends InvalidArgumentException. Change-Id: I86199105814b63d4340e5de0e471d0da6b579ead Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.jgit.test/META-INF')
-rw-r--r--org.eclipse.jgit.test/META-INF/MANIFEST.MF1
1 files changed, 1 insertions, 0 deletions
diff --git a/org.eclipse.jgit.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.test/META-INF/MANIFEST.MF
index 05b524d381..5db483b1fa 100644
--- a/org.eclipse.jgit.test/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.test/META-INF/MANIFEST.MF
@@ -40,6 +40,7 @@ Import-Package: org.eclipse.jgit.api;version="[2.0.0,2.1.0)",
org.eclipse.jgit.util;version="[2.0.0,2.1.0)",
org.eclipse.jgit.util.io;version="[2.0.0,2.1.0)",
org.hamcrest;version="[1.1.0,2.0.0)",
+ org.hamcrest.text.pattern;version="[1.1.0,2.0.0)",
org.junit;version="[4.4.0,5.0.0)",
org.junit.experimental.theories;version="[4.4.0,5.0.0)",
org.junit.runner;version="[4.4.0,5.0.0)"