Commit 37764014 authored by Dave Cridland's avatar Dave Cridland

Merge pull request #236 from AndiHeusser/of889

Prevent sessions in admin console from showing UnknownHostException
parents 34286d24 7037e77f
......@@ -151,9 +151,13 @@
<fmt:message key="session.details.hostname" />
</td>
<td>
<% try { %>
<%= StringUtils.escapeHTMLTags(componentSession.getHostAddress()) %>
/
<%= StringUtils.escapeHTMLTags(componentSession.getHostName()) %>
<% } catch (java.net.UnknownHostException e) { %>
Invalid session/connection
<% } %>
</td>
</tr>
</tbody>
......
......@@ -99,7 +99,8 @@
<fmt:message key="server.session.details.hostname" />
</td>
<td>
<% if (!inSessions.isEmpty()) { %>
<% try {
if (!inSessions.isEmpty()) { %>
<%= inSessions.get(0).getHostAddress() %>
/
<%= inSessions.get(0).getHostName() %>
......@@ -107,6 +108,9 @@
<%= outSession.getHostAddress() %>
/
<%= outSession.getHostName() %>
<% }
} catch (java.net.UnknownHostException e) { %>
Invalid session/connection
<% } %>
</td>
</tr>
......
......@@ -281,9 +281,13 @@
<fmt:message key="session.details.hostname" />
</td>
<td>
<% try { %>
<%= currentSess.getHostAddress() %>
/
<%= currentSess.getHostName() %>
<% } catch (java.net.UnknownHostException e) { %>
Invalid session/connection
<% } %>
</td>
</tr>
</tbody>
......
......@@ -168,7 +168,11 @@
</td>
<td width="1%" nowrap>
<% try { %>
<%= sess.getHostAddress() %>
<% } catch (java.net.UnknownHostException e) { %>
Invalid session/connection
<% } %>
</td>
<td width="1%" nowrap align="center" style="border-right:1px #ccc solid;">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment