From 19509438d9a0fe64b4e18c1dd531f279082e4878 Mon Sep 17 00:00:00 2001 From: reger Date: Fri, 27 May 2016 17:30:17 +0200 Subject: [PATCH] fix RuntimeException in ConfigRobotsTxt_p in intranet mode due to getIP returning null, by removing redundant property setting of "clientname" which is globally set by template engine --- htroot/ConfigRobotsTxt_p.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htroot/ConfigRobotsTxt_p.java b/htroot/ConfigRobotsTxt_p.java index 0f7e254db..bf140e8c2 100644 --- a/htroot/ConfigRobotsTxt_p.java +++ b/htroot/ConfigRobotsTxt_p.java @@ -43,8 +43,9 @@ public class ConfigRobotsTxt_p { final Switchboard sb = (Switchboard) env; final servletProperties prop = new servletProperties(); - final RobotsTxtConfig rbc = ((Switchboard)env).robotstxtConfig; - prop.put("clientname", sb.peers.mySeed().getPublicAddress(sb.peers.mySeed().getIP())); + final RobotsTxtConfig rbc = sb.robotstxtConfig; + // globaly overwitten by template engine (removed to avoid risk of NPE in intranet mode) + // prop.put("clientname", sb.peers.mySeed().getPublicAddress(sb.peers.mySeed().getIP())); if (post != null) { if (post.containsKey("save")) {