Class LogCleanerUtil

java.lang.Object
com.sun.logging.LogCleanerUtil

@Deprecated public final class LogCleanerUtil extends Object
Deprecated.
This class is mostly deprecated as the logging framework must ensure proper encoding.
Util class for static methods for handling encoding of invalid string characters. Use recommendations from Open Web Application Security Project (see here https://owasp.org/www-community/attacks/Log_Injection)
  • Method Details

    • removeLinearWhiteSpaces

      public static String removeLinearWhiteSpaces(String input)
      Deprecated.
      Remove extra white spaces in String and convert into lowercase.
      Parameters:
      input - Input String
      Returns:
      string
    • getSafeHeaderValue

      public static String getSafeHeaderValue(String headerValue)
      Deprecated.
    • neutralizeForLog

      public static String neutralizeForLog(String message)
      Deprecated.
    • encodeCharacter

      public static String encodeCharacter(int codePoint)
      Deprecated.