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 @@ ...@@ -151,9 +151,13 @@
<fmt:message key="session.details.hostname" /> <fmt:message key="session.details.hostname" />
</td> </td>
<td> <td>
<% try { %>
<%= StringUtils.escapeHTMLTags(componentSession.getHostAddress()) %> <%= StringUtils.escapeHTMLTags(componentSession.getHostAddress()) %>
/ /
<%= StringUtils.escapeHTMLTags(componentSession.getHostName()) %> <%= StringUtils.escapeHTMLTags(componentSession.getHostName()) %>
<% } catch (java.net.UnknownHostException e) { %>
Invalid session/connection
<% } %>
</td> </td>
</tr> </tr>
</tbody> </tbody>
......
...@@ -99,7 +99,8 @@ ...@@ -99,7 +99,8 @@
<fmt:message key="server.session.details.hostname" /> <fmt:message key="server.session.details.hostname" />
</td> </td>
<td> <td>
<% if (!inSessions.isEmpty()) { %> <% try {
if (!inSessions.isEmpty()) { %>
<%= inSessions.get(0).getHostAddress() %> <%= inSessions.get(0).getHostAddress() %>
/ /
<%= inSessions.get(0).getHostName() %> <%= inSessions.get(0).getHostName() %>
...@@ -107,6 +108,9 @@ ...@@ -107,6 +108,9 @@
<%= outSession.getHostAddress() %> <%= outSession.getHostAddress() %>
/ /
<%= outSession.getHostName() %> <%= outSession.getHostName() %>
<% }
} catch (java.net.UnknownHostException e) { %>
Invalid session/connection
<% } %> <% } %>
</td> </td>
</tr> </tr>
......
...@@ -281,9 +281,13 @@ ...@@ -281,9 +281,13 @@
<fmt:message key="session.details.hostname" /> <fmt:message key="session.details.hostname" />
</td> </td>
<td> <td>
<% try { %>
<%= currentSess.getHostAddress() %> <%= currentSess.getHostAddress() %>
/ /
<%= currentSess.getHostName() %> <%= currentSess.getHostName() %>
<% } catch (java.net.UnknownHostException e) { %>
Invalid session/connection
<% } %>
</td> </td>
</tr> </tr>
</tbody> </tbody>
......
...@@ -168,7 +168,11 @@ ...@@ -168,7 +168,11 @@
</td> </td>
<td width="1%" nowrap> <td width="1%" nowrap>
<% try { %>
<%= sess.getHostAddress() %> <%= sess.getHostAddress() %>
<% } catch (java.net.UnknownHostException e) { %>
Invalid session/connection
<% } %>
</td> </td>
<td width="1%" nowrap align="center" style="border-right:1px #ccc solid;"> <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