Skip to content

Commit

Permalink
Patched src/com/ibm/security/appscan/altoromutual/servlet/AdminServle…
Browse files Browse the repository at this point in the history
…t.java
  • Loading branch information
patched.codes[bot] committed May 1, 2024
1 parent dda2a40 commit 254006f
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,11 @@ else if (request.getRequestURL().toString().endsWith("changePassword")){
if (message != null)
message = "Error: " + message;
else
message = "Requested operation has completed successfully.";
(message = "Requested operation has completed successfully.");

request.getSession().setAttribute("message", message);
// Sanitize user input before setting it in the session attribute "message"
String sanitizedMessage = message.replaceAll("[^a-zA-Z0-9\\s\\.\\,\\!]", "");
request.getSession().setAttribute("message", sanitizedMessage);
response.sendRedirect("admin.jsp");
return ;
}
Expand Down

0 comments on commit 254006f

Please sign in to comment.