From a8ecda0a455b469f52ee6e21518ff8db6e71880f Mon Sep 17 00:00:00 2001 From: sany cyrus Date: Wed, 9 Oct 2024 17:51:18 +0530 Subject: [PATCH 1/3] Update UserController.java --- .../java/com/veracode/verademo/controller/UserController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/src/main/java/com/veracode/verademo/controller/UserController.java b/test/src/main/java/com/veracode/verademo/controller/UserController.java index 50222d2..b569014 100644 --- a/test/src/main/java/com/veracode/verademo/controller/UserController.java +++ b/test/src/main/java/com/veracode/verademo/controller/UserController.java @@ -42,7 +42,7 @@ public String showLogin( if (target == null) { target = ""; } - //.. + //... logger.info("Entering showLogin with username " + username + " and target " + target); From 45e16b4aa8cf62cb8464a4390ed73f9b53cfe1e8 Mon Sep 17 00:00:00 2001 From: Veracode Fix Bot Date: Wed, 9 Oct 2024 12:26:47 +0000 Subject: [PATCH 2/3] Veracode-Fix-Bot - update test/src/main/java/com/veracode/verademo/controller/UserController.java with patch --- .../java/com/veracode/verademo/controller/UserController.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/src/main/java/com/veracode/verademo/controller/UserController.java b/test/src/main/java/com/veracode/verademo/controller/UserController.java index b569014..99daf67 100644 --- a/test/src/main/java/com/veracode/verademo/controller/UserController.java +++ b/test/src/main/java/com/veracode/verademo/controller/UserController.java @@ -11,6 +11,7 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam; +import org.apache.commons.text.StringEscapeUtils; /** * @author johnadmin @@ -44,7 +45,7 @@ public String showLogin( } //... - logger.info("Entering showLogin with username " + username + " and target " + target); + logger.info("Entering showLogin with username " + StringEscapeUtils.escapeJava(username) + " and target " + target); model.addAttribute("username", username); model.addAttribute("target", target); From 084eb2f8d63580cbcb214ff54bddc1263b048da1 Mon Sep 17 00:00:00 2001 From: sany cyrus Date: Wed, 9 Oct 2024 18:01:37 +0530 Subject: [PATCH 3/3] Update pom.xml --- test/pom.xml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/pom.xml b/test/pom.xml index 715038c..bbe3784 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -91,7 +91,11 @@ commons-io 2.4 - + + org.apache.commons + commons-text + 1.9 + org.apache.sling