File tree Expand file tree Collapse file tree 3 files changed +8
-4
lines changed
Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -106,7 +106,7 @@ module FileSystemWriteAccess {
106106}
107107
108108/**
109- * A data-flow node that may set or unset Cross-site request forgery protection
109+ * A data-flow node that enables or disables Cross-site request forgery protection
110110 * in a global manner.
111111 *
112112 * Extend this class to refine existing API models. If you want to model new APIs,
Original file line number Diff line number Diff line change @@ -2330,8 +2330,12 @@ module PrivateDjango {
23302330 mw .asVar ( ) .getName ( ) = "MIDDLEWARE" and
23312331 DataFlow:: localFlow ( this , mw )
23322332 |
2333- // it only counts as setting the CSRF protection, if the app uses authentication,
2334- // so check that the list contains the django authentication middleware.
2333+ // To only include results where CSRF protection matters, we only care about CSRF
2334+ // protection when the django authentication middleware is enabled.
2335+ // Since an active session cookie is exactly what would allow an attacker to perform
2336+ // a CSRF attack.
2337+ // Notice that this does not ensure that this is not a FP, since the authentication
2338+ // middleware might be unused.
23352339 //
23362340 // This also strongly implies that we are actually looking at the `MIDDLEWARE` setting.
23372341 list .getAnElt ( ) .( StrConst ) .getText ( ) =
Original file line number Diff line number Diff line change 66 <overview >
77 <p >
88 Cross-site request forgery (CSRF) is a type of vulnerability in which an
9- attacker is able to force a user carry out an action that the user did
9+ attacker is able to force a user to carry out an action that the user did
1010 not intend.
1111 </p >
1212
You can’t perform that action at this time.
0 commit comments