Improper Handling of Unicode Encoding

ID

scala.strings.scala_strings_rule_improperunicode

Severity

high

Remediation Complexity

medium

Remediation Risk

medium

Remediation Effort

medium

Resource

Strings

Language

Scala

Description

Improper Handling of Unicode Encoding

Rationale

Improper Handling of Unicode Encoding

The following code illustrates a vulnerable pattern detected by this rule:

def dangerToUpperEquals(s: String) = {
  // VULNERABLE: Improper Handling of Unicode Encoding
  s.toUpperCase().equals("TEST")
}

Remediation

Follow secure coding practices and review the references below for detailed remediation guidance.

Configuration

This detector does not need any configuration.

References