Skip to content

Commit 9460c91

Browse files
committed
C#: Also consider nullable simple types (and datetime) as simple type sanitizers.
1 parent 5598420 commit 9460c91

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

csharp/ql/lib/semmle/code/csharp/security/Sanitizers.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class UrlSanitizedExpr extends Expr {
5555
*/
5656
class SimpleTypeSanitizedExpr extends DataFlow::ExprNode {
5757
SimpleTypeSanitizedExpr() {
58-
exists(Type t | t = this.getType() |
58+
exists(Type t | t = this.getType() or t = this.getType().(NullableType).getUnderlyingType() |
5959
t instanceof SimpleType or
6060
t instanceof SystemDateTimeStruct
6161
)

0 commit comments

Comments
 (0)