C#: Also consider nullable simple types (and datetime) as simple type sanitizers.

This commit is contained in:
Michael Nebel
2024-01-18 12:53:29 +01:00
parent 559842071a
commit 9460c91c8c

View File

@@ -55,7 +55,7 @@ class UrlSanitizedExpr extends Expr {
*/
class SimpleTypeSanitizedExpr extends DataFlow::ExprNode {
SimpleTypeSanitizedExpr() {
exists(Type t | t = this.getType() |
exists(Type t | t = this.getType() or t = this.getType().(NullableType).getUnderlyingType() |
t instanceof SimpleType or
t instanceof SystemDateTimeStruct
)