Checkmarx Java fix for Log Forging -sanitizing user input
问题 Can anyone suggest the proper sanitization/validation process required for the courseType variable in the following getCourses method. I am using that variable to write in a log file. I've tried HtmlUtils.HtmlEscape() but didn't get expected results. Thanks! @RequestMapping(value = "/retriveCourses", method = RequestMethod.GET) @ResponseBody public List<Course> getCourses(@RequestParam(value = "courseType", required = false) String courseType) { } 回答1: it seems like the Checkmarx tool is