...
This compliant solution sanitizes the user name input before logging it. Refer to MSC39-J. Sanitize before processing or storing user input for more details on input sanitization.
Code Block | ||
---|---|---|
| ||
String username = getUserName(); sanitize(username); logger.severe("Invalid username:" + username); |
...