Skip to content

Commit

Permalink
making sure to not log user controlled data
Browse files Browse the repository at this point in the history
  • Loading branch information
SR20290919 authored and SR20290919 committed Nov 19, 2024
1 parent 866ec9f commit 2be7f43
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -698,8 +698,7 @@ public String getPartialBeneficiariesByBenRegIds(
@PostMapping(path = "/getByBenRegIdList", headers = "Authorization")
public String getBeneficiariesByBenRegIds(
@RequestBody Long[] benRegIds) { // Accepting an array of Longs directly
String logMessage = String.format("IdentityController.getBeneficiariesByBenRegIds - start. benRegIdList = %s", Arrays.toString(benRegIds)) ;
logger.info(logMessage);
logger.info("IdentityController.getBeneficiariesByBenRegIds - start. benRegIdList = " + benRegIds.length);

Check notice

Code scanning / SonarCloud

Logging should not be vulnerable to injection attacks Low

Change this code to not log user-controlled data. See more on SonarQube Cloud
// If benRegIds is null or empty, return an error response
if (benRegIds == null || benRegIds.length == 0) {
Expand Down

0 comments on commit 2be7f43

Please sign in to comment.