Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions WebContent/search.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ IBM AltoroJ

<%
String query = request.getParameter("query");
String id = request.getParameter("id");
String[] results = null;
if (query != null && query.trim().length()>0)
results = ServletUtil.searchSite(query, request.getSession().getServletContext().getRealPath("/static/"));
Expand All @@ -42,6 +43,7 @@ IBM AltoroJ
<p>No results were found for the query:<br /><br />

<%= query %>
<%= id %>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  Cross-site Scripting (XSS)

Unsanitized input from an HTTP parameter flows into print, where it is used to render an HTML page returned to the user. This may result in a Cross-Site Scripting attack (XSS).

Line 46 | CWE-79 | Priority score 900 | Learn more about this vulnerability
Data flow: 5 steps

Step 1 - 3

String id = request.getParameter("id");

Step 4 - 5


</div>
</td>
Expand Down