Skip to content

Commit 130f8f1

Browse files
committed
Convert barrier to MaD
I confirmed that without the model a test fails.
1 parent 68b6181 commit 130f8f1

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

csharp/ql/lib/ext/System.Web.model.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
extensions:
2+
- addsTo:
3+
pack: codeql/csharp-all
4+
extensible: barrierModel
5+
data:
6+
# The RawUrl property is considered to be safe for URL redirects
7+
- ["System.Web", "HttpRequest", False, "get_RawUrl", "()", "", "ReturnValue", "url-redirection", "manual"]
28
- addsTo:
39
pack: codeql/csharp-all
410
extensible: sinkModel

csharp/ql/lib/semmle/code/csharp/security/dataflow/UrlRedirectQuery.qll

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -189,16 +189,6 @@ class HostComparisonSanitizer extends Sanitizer {
189189
}
190190
}
191191

192-
/**
193-
* A call to the getter of the RawUrl property, whose value is considered to be safe for URL
194-
* redirects.
195-
*/
196-
class RawUrlSanitizer extends Sanitizer {
197-
RawUrlSanitizer() {
198-
this.getExpr() = any(SystemWebHttpRequestClass r).getRawUrlProperty().getGetter().getACall()
199-
}
200-
}
201-
202192
/**
203193
* A string concatenation expression, where the left hand side contains the character "?".
204194
*

0 commit comments

Comments
 (0)