git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@1364 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
allo 19 years ago
parent ca7407b7e1
commit 5eba6c66c6

@ -128,6 +128,7 @@ public final class transfer {
path.mkdirs();
File file = new File(path, filename);
try {
if (file.getCanonicalPath().toString().startsWith(path.getCanonicalPath().toString())){
serverFileUtils.write(filebytes, file);
String md5t = serverCodings.encodeMD5Hex(file);
if (md5t.equals(md5)) {
@ -137,6 +138,11 @@ public final class transfer {
prop.put("response", "transfer failure");
sb.getLog().logFine("RankingTransmission: transfer failunre from peer " + otherpeerName + " for CR file " + filename);
}
}else{
//exploit?
prop.put("response", "io error");
return prop;
}
} catch (IOException e) {
prop.put("response", "io error");
}

Loading…
Cancel
Save