From 9312fbe56376cb8ae68845341f0b80da21ed90a9 Mon Sep 17 00:00:00 2001 From: reger Date: Sun, 21 Feb 2016 21:38:11 +0100 Subject: [PATCH] making WebStructurePicture_p less vulnerable to faulty host input parameter (like host1,,host3) by continue host loop on exception inspired by http://mantis.tokeek.de/view.php?id=637 --- htroot/WebStructurePicture_p.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/htroot/WebStructurePicture_p.java b/htroot/WebStructurePicture_p.java index b1d922901..ff548544c 100644 --- a/htroot/WebStructurePicture_p.java +++ b/htroot/WebStructurePicture_p.java @@ -117,7 +117,11 @@ public class WebStructurePicture_p { for (int i = 0; i < hostlist.length; i++) { String host = hostlist[i]; String hash = null; - try {hash = ASCII.String((new DigestURL("http://" + host)).hash(), 6, 6);} catch (final MalformedURLException e) {ConcurrentLog.logException(e);} + try { + hash = ASCII.String((new DigestURL("http://" + host)).hash(), 6, 6); + } catch (final MalformedURLException e) { + continue; + } Map.Entry centernode = new AbstractMap.SimpleEntry(hash, host); double angle = 2.0d * i * Math.PI / hostlist.length; if (hostlist.length == 3) angle -= Math.PI / 2;