JS: PropertyProjectionTest

This commit is contained in:
Asger Feldthaus
2020-03-27 20:29:50 +00:00
parent a39086ab27
commit 92d555166a

View File

@@ -134,14 +134,12 @@ private class SimplePropertyProjection extends PropertyProjection::Range {
/**
* A taint step for a property projection.
*/
private class PropertyProjectionTaintStep extends TaintTracking::AdditionalTaintStep {
PropertyProjection projection;
PropertyProjectionTaintStep() { projection = this }
private class PropertyProjectionTaintStep extends TaintTracking::SharedTaintStep {
override predicate step(DataFlow::Node pred, DataFlow::Node succ) {
// reading from a tainted object yields a tainted result
this = succ and
pred = projection.getObject()
exists(PropertyProjection projection |
pred = projection.getObject() and
succ = projection
)
}
}