@@ -150,70 +150,6 @@ abstract class UserInput extends DataFlow::Node { }
150150 */
151151deprecated class RemoteUserInput extends UserInput {
152152 RemoteUserInput ( ) { this instanceof RemoteFlowSource }
153-
154- /**
155- * DEPRECATED: Use a configuration with a defined sink instead.
156- *
157- * Holds if taint can flow from this `RemoteUserInput` to `sink`.
158- *
159- * In addition to the basic taint flow, this allows a path to end in a number
160- * of steps through instance fields.
161- */
162- deprecated predicate flowsTo ( DataFlow:: Node sink ) { remoteUserInputFlow ( this , sink ) }
163- }
164-
165- /**
166- * Holds if taint can flow from `node1` to `node2` in either one local step or
167- * through an instance field.
168- */
169- private predicate localInstanceFieldStep ( DataFlow:: Node node1 , DataFlow:: Node node2 ) {
170- TaintTracking:: localTaintStep ( node1 , node2 )
171- or
172- exists ( InstanceField field |
173- node1 .asExpr ( ) = field .getAnAssignedValue ( )
174- or
175- exists ( Assignment assign | assign .getRhs ( ) = node1 .asExpr ( ) |
176- assign .getDest ( ) .( ArrayAccess ) .getArray ( ) = field .getAnAccess ( )
177- )
178- |
179- node2 .asExpr ( ) = field .getAnAccess ( )
180- )
181- }
182-
183- private module RemoteUserInputFlow {
184- private import semmle.code.java.dataflow.internal.DataFlowImplDepr
185- private import semmle.code.java.security.SecurityTests
186- private import semmle.code.java.security.Validation
187-
188- deprecated class RemoteUserInputConfig extends Configuration {
189- RemoteUserInputConfig ( ) { this = "FlowSources.qll:RemoteUserInputConfig" }
190-
191- override predicate isSource ( DataFlow:: Node source ) { source instanceof RemoteUserInput }
192-
193- override predicate isSink ( DataFlow:: Node sink ) { any ( ) }
194-
195- override int fieldFlowBranchLimit ( ) { result = 0 }
196-
197- override predicate isBarrier ( DataFlow:: Node node ) {
198- // Ignore paths through test code.
199- node .getEnclosingCallable ( ) .getDeclaringType ( ) instanceof NonSecurityTestClass or
200- exists ( ValidatedVariable var | node .asExpr ( ) = var .getAnAccess ( ) )
201- }
202-
203- override predicate isAdditionalFlowStep ( DataFlow:: Node node1 , DataFlow:: Node node2 ) {
204- TaintTracking:: localAdditionalTaintStep ( node1 , node2 )
205- }
206- }
207- }
208-
209- cached
210- deprecated private predicate remoteUserInputFlow ( RemoteUserInput src , DataFlow:: Node sink ) {
211- any ( RemoteUserInputFlow:: RemoteUserInputConfig config ) .hasFlow ( src , sink )
212- or
213- exists ( DataFlow:: Node mid |
214- remoteUserInputFlow ( src , mid ) and
215- localInstanceFieldStep ( mid , sink )
216- )
217153}
218154
219155/** Input that may be controlled by a local user. */
0 commit comments