Skip to content

Commit ac56441

Browse files
committed
fix(hal browser): fix xss vulnerability
1 parent a79ad29 commit ac56441

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

vendor/hal-browser/browser.html

+6-4
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,10 @@ <h2>Links</h2>
6363
<% if ($.isArray(obj)) { %>
6464
<% _.each(obj, function(link, i) { %>
6565
<tr>
66+
<!-- pact_broker escaping -->
6667
<td><strong><%= HAL.truncateIfUrl(rel) %></strong></td>
67-
<td><%= link.title || '' %></td>
68-
<td><%= link.name ? 'name: ' + link.name : 'index: ' + i %></a></td>
68+
<td><%- link.title || '' %></td>
69+
<td><%- link.name ? 'name: ' + link.name : 'index: ' + i %></a></td>
6970
<td>
7071
<% if (HAL.isUrl(rel)) { %>
7172
<a class="dox" href="<%= HAL.normalizeUrl(HAL.buildUrl(rel)) %>"><i class="icon-book"></i></a>
@@ -86,8 +87,9 @@ <h2>Links</h2>
8687
<% } else { %>
8788
<tr>
8889
<td><strong><%= HAL.truncateIfUrl(rel) %></strong></td>
89-
<td><%= obj.title || '' %></td>
90-
<td><%= obj.name || '' %></td>
90+
<!-- pact_broker escaping -->
91+
<td><%- obj.title || '' %></td>
92+
<td><%- obj.name || '' %></td>
9193
<td>
9294
<% if (HAL.isUrl(rel)) { %>
9395
<a class="dox" href="<%= HAL.normalizeUrl(HAL.buildUrl(rel)) %>"><i class="icon-book"></i></a>

0 commit comments

Comments
 (0)