Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update UserController.java #38

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
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
6 changes: 5 additions & 1 deletion test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,11 @@
<artifactId>commons-io</artifactId>
<version>2.4</version>
</dependency>

<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-text</artifactId>
<version>1.9</version>
</dependency>
<!-- Vuln Method libs -->
<dependency>
<groupId>org.apache.sling</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -41,13 +42,13 @@

if (target == null) {
target = "";
}
//..
//...

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);

Check warning on line 51 in test/src/main/java/com/veracode/verademo/controller/UserController.java

View workflow job for this annotation

GitHub Actions / Veracode Fix suggestions

Security findings between line numbers 45 and 51

} //... - logger.info("Entering showLogin with username " + StringEscapeUtils.escapeJava(username) + " and target " + target); + logger.info("Entering showLogin with username " + StringEscapeUtils.escapeJava(StringEscapeUtils.escapeJava(username)) + " and target " + target); model.addAttribute("username", username); model.addAttribute("target", target);
return "login";
}
}
Loading