From cd316333695feff86b74effcfd6066015be2d3ab Mon Sep 17 00:00:00 2001 From: reger Date: Sun, 24 May 2015 19:38:04 +0200 Subject: [PATCH] improve MultiprotocolURL.getFileExtension() prevent string OOB while querypart contains a dot (return just "") see log snippet in http://mantis.tokeek.de/view.php?id=533 --- .../yacy/cora/document/id/MultiProtocolURL.java | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/source/net/yacy/cora/document/id/MultiProtocolURL.java b/source/net/yacy/cora/document/id/MultiProtocolURL.java index 5bb3c068f..bbabed6b5 100644 --- a/source/net/yacy/cora/document/id/MultiProtocolURL.java +++ b/source/net/yacy/cora/document/id/MultiProtocolURL.java @@ -827,11 +827,26 @@ public class MultiProtocolURL implements Serializable, Comparable q) { + return ""; // TODO: last . after ? (file.ext?param=one.txt) + } else { + return fileName.substring(p + 1, q).toLowerCase(); + } + } } public String getPath() {