Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 92d5551

Browse files
committed
JS: PropertyProjectionTest
1 parent a39086a commit 92d5551

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

javascript/ql/src/semmle/javascript/frameworks/PropertyProjection.qll

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -134,14 +134,12 @@ private class SimplePropertyProjection extends PropertyProjection::Range {
134134
/**
135135
* A taint step for a property projection.
136136
*/
137-
private class PropertyProjectionTaintStep extends TaintTracking::AdditionalTaintStep {
138-
PropertyProjection projection;
139-
140-
PropertyProjectionTaintStep() { projection = this }
141-
137+
private class PropertyProjectionTaintStep extends TaintTracking::SharedTaintStep {
142138
override predicate step(DataFlow::Node pred, DataFlow::Node succ) {
143139
// reading from a tainted object yields a tainted result
144-
this = succ and
145-
pred = projection.getObject()
140+
exists(PropertyProjection projection |
141+
pred = projection.getObject() and
142+
succ = projection
143+
)
146144
}
147145
}

0 commit comments

Comments
 (0)