Skip to content

Commit

Permalink
added fixed for XSS holes (fixes #93)
Browse files Browse the repository at this point in the history
  • Loading branch information
rodnaph committed May 8, 2012
1 parent 18fee9b commit fe2d895
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@
Vector<User> recentUsers = null;
</%args>

<& ../IHeader; properties=properties; title="Playlist: " + playlist.getName(); user=user; locale=locale; &>
<& ../IHeader; properties=properties; title="Playlist: " + Utils.XMLEncode(playlist.getName()); user=user; locale=locale; &>

<h2>
<div class="links">
<% Utils.u2e(playlist.getName()) #n %>
<% Utils.XMLEncode(playlist.getName()) #n %>
<div class="links">
<& IMusicLinks; type="pl"; id=playlist.getId(); name=playlist.getName(); shareLink=true; playRandomLink=true; locale=locale; properties=properties; &>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@
<%for Playlist playlist : userPlaylists %>
<li class="playlist" id="userPlaylist<% playlist.getId() %>">
<& IMusicLinks; type="pl"; id=playlist.getId(); name=playlist.getName(); locale=locale; properties=properties; &>
<a href="<% properties.getUrl("/browse/playlist/"+playlist.getId()) #n %>"><% Utils.u2e(playlist.getName()) #n %></a>
<a href="<% properties.getUrl("/browse/playlist/"+playlist.getId()) #n %>"><% Utils.XMLEncode(playlist.getName()) #n %></a>
by
<%if user != null && (user.getId() == playlist.getUser().getId()) %>
<b>you</b>
<%else>
<% Utils.u2e(playlist.getUser().getName()) #n %>
<% Utils.XMLEncode(playlist.getUser().getName()) #n %>
</%if>
(<% playlist.getTrackCount() %> track<%if playlist.getTrackCount() != 1 %>s</%if>)
<%if user != null && (playlist.getUser().getId() == user.getId()) %>
Expand Down

0 comments on commit fe2d895

Please sign in to comment.