Weakness (CWE)
CWE-597: Use of Wrong Operator in String Comparison
Variant Draft
The product uses the wrong operator when comparing a string, such as using "==" when the .equals() method should be used instead.
How to prevent it (1 mitigation)
-
Implementation
Within Java, use .equals() to compare string values.
Within JavaScript, use == to compare string values.
Within PHP, use == to compare a numeric value to a string value. (PHP converts the string to a number.)
Source: MITRE CWE-597
0 results · Clear filters · Feed
Nothing found.