@@ -114,61 +114,6 @@ Expr getAValueForProp(ObjectCreation create, Assignment a, string prop) {
114114 */
115115predicate isPropertySet ( ObjectCreation oc , string prop ) { exists ( getAValueForProp ( oc , _, prop ) ) }
116116
117- /**
118- * Tracks if a callback used in `OnAppendCookie` sets a cookie property to `true`.
119- */
120- abstract deprecated private class OnAppendCookieTrackingConfig extends DataFlow:: Configuration {
121- bindingset [ this ]
122- OnAppendCookieTrackingConfig ( ) { any ( ) }
123-
124- /**
125- * Specifies the cookie property name to track.
126- */
127- abstract string propertyName ( ) ;
128-
129- override predicate isSource ( DataFlow:: Node source ) {
130- exists ( PropertyWrite pw , Assignment delegateAssign , Callable c |
131- pw .getProperty ( ) .getName ( ) = "OnAppendCookie" and
132- pw .getProperty ( ) .getDeclaringType ( ) instanceof MicrosoftAspNetCoreBuilderCookiePolicyOptions and
133- delegateAssign .getLValue ( ) = pw and
134- (
135- exists ( LambdaExpr lambda |
136- delegateAssign .getRValue ( ) = lambda and
137- lambda = c
138- )
139- or
140- exists ( DelegateCreation delegate |
141- delegateAssign .getRValue ( ) = delegate and
142- delegate .getArgument ( ) .( CallableAccess ) .getTarget ( ) = c
143- )
144- ) and
145- c .getParameter ( 0 ) = source .asParameter ( )
146- )
147- }
148-
149- override predicate isSink ( DataFlow:: Node sink ) {
150- exists ( PropertyWrite pw , Assignment a |
151- pw .getProperty ( ) .getDeclaringType ( ) instanceof MicrosoftAspNetCoreHttpCookieOptions and
152- pw .getProperty ( ) .getName ( ) = this .propertyName ( ) and
153- a .getLValue ( ) = pw and
154- exists ( Expr val |
155- DataFlow:: localExprFlow ( val , a .getRValue ( ) ) and
156- val .getValue ( ) = "true"
157- ) and
158- sink .asExpr ( ) = pw .getQualifier ( )
159- )
160- }
161-
162- override predicate isAdditionalFlowStep ( DataFlow:: Node node1 , DataFlow:: Node node2 ) {
163- node2 .asExpr ( ) =
164- any ( PropertyRead pr |
165- pr .getQualifier ( ) = node1 .asExpr ( ) and
166- pr .getProperty ( ) .getDeclaringType ( ) instanceof
167- MicrosoftAspNetCoreCookiePolicyAppendCookieContext
168- )
169- }
170- }
171-
172117private signature string propertyName ( ) ;
173118
174119/**
0 commit comments