mirror of
https://github.com/github/codeql.git
synced 2026-02-12 05:01:06 +01:00
Convert barrier to MaD
I confirmed that without the model a test fails.
This commit is contained in:
@@ -1,4 +1,10 @@
|
||||
extensions:
|
||||
- addsTo:
|
||||
pack: codeql/csharp-all
|
||||
extensible: barrierModel
|
||||
data:
|
||||
# The RawUrl property is considered to be safe for URL redirects
|
||||
- ["System.Web", "HttpRequest", False, "get_RawUrl", "()", "", "ReturnValue", "url-redirection", "manual"]
|
||||
- addsTo:
|
||||
pack: codeql/csharp-all
|
||||
extensible: sinkModel
|
||||
|
||||
@@ -189,16 +189,6 @@ class HostComparisonSanitizer extends Sanitizer {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A call to the getter of the RawUrl property, whose value is considered to be safe for URL
|
||||
* redirects.
|
||||
*/
|
||||
class RawUrlSanitizer extends Sanitizer {
|
||||
RawUrlSanitizer() {
|
||||
this.getExpr() = any(SystemWebHttpRequestClass r).getRawUrlProperty().getGetter().getACall()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A string concatenation expression, where the left hand side contains the character "?".
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user