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 {
175175 }
176176
177177 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+ )
181184 }
182185
183186 override DataFlow:: Node getHeaderArg ( ) { none ( ) }
Original file line number Diff line number Diff line change @@ -121,9 +121,12 @@ module ExperimentalFlask {
121121 }
122122
123123 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+ )
127130 }
128131
129132 override DataFlow:: Node getHeaderArg ( ) { none ( ) }
You can’t perform that action at this time.
0 commit comments