File tree Expand file tree Collapse file tree 2 files changed +12
-6
lines changed
python/ql/src/experimental/semmle/python/frameworks Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -175,9 +175,12 @@ private module PrivateDjango {
175
175
}
176
176
177
177
override predicate isSameSite ( ) {
178
- this .( DataFlow:: CallCfgNode ) .getArgByName ( "samesite" ) .asExpr ( ) .( Str_ ) .getS ( ) in [
179
- "Strict" , "Lax"
180
- ]
178
+ exists ( StrConst str |
179
+ str .getText ( ) in [ "Strict" , "Lax" ] and
180
+ DataFlow:: exprNode ( str )
181
+ .( DataFlow:: LocalSourceNode )
182
+ .flowsTo ( this .( DataFlow:: CallCfgNode ) .getArgByName ( "samesite" ) )
183
+ )
181
184
}
182
185
183
186
override DataFlow:: Node getHeaderArg ( ) { none ( ) }
Original file line number Diff line number Diff line change @@ -121,9 +121,12 @@ module ExperimentalFlask {
121
121
}
122
122
123
123
override predicate isSameSite ( ) {
124
- this .( DataFlow:: CallCfgNode ) .getArgByName ( "samesite" ) .asExpr ( ) .( Str_ ) .getS ( ) in [
125
- "Strict" , "Lax"
126
- ]
124
+ exists ( StrConst str |
125
+ str .getText ( ) in [ "Strict" , "Lax" ] and
126
+ DataFlow:: exprNode ( str )
127
+ .( DataFlow:: LocalSourceNode )
128
+ .flowsTo ( this .( DataFlow:: CallCfgNode ) .getArgByName ( "samesite" ) )
129
+ )
127
130
}
128
131
129
132
override DataFlow:: Node getHeaderArg ( ) { none ( ) }
You can’t perform that action at this time.
0 commit comments