Skip to content

Commit

Permalink
Fix V5_Reflected XSS
Browse files Browse the repository at this point in the history
  • Loading branch information
Davide Avellone committed Jul 10, 2023
1 parent 39d17cd commit 5d7cb78
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/com/notsecurebank/api/FeedbackAPI.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import org.apache.log4j.Logger;
import org.apache.wink.json4j.JSONException;
import org.apache.wink.json4j.JSONObject;
import org.apache.commons.text.StringEscapeUtils;

import com.notsecurebank.model.Feedback;
import com.notsecurebank.util.OperationsUtil;
Expand Down Expand Up @@ -46,6 +47,7 @@ public Response sendFeedback(String bodyJSON, @Context HttpServletRequest reques

try {
name = (String) myJson.get("name");
name = StringEscapeUtils.escapeHtml(name);
email = (String) myJson.get("email");
subject = (String) myJson.get("subject");
comments = (String) myJson.get("message");
Expand Down

0 comments on commit 5d7cb78

Please sign in to comment.