File tree Expand file tree Collapse file tree 1 file changed +13
-4
lines changed
javascript/ql/src/semmle/javascript/frameworks Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -75,10 +75,6 @@ private DataFlow::SourceNode getASimplePropertyProjectionCallee(
75
75
) {
76
76
singleton = false and
77
77
(
78
- result = LodashUnderscore:: member ( "pick" ) and
79
- objectIndex = 0 and
80
- selectorIndex = [ 1 .. max ( result .getACall ( ) .getNumArgument ( ) ) ]
81
- or
82
78
result = LodashUnderscore:: member ( "pickBy" ) and
83
79
objectIndex = 0 and
84
80
selectorIndex = 1
@@ -131,6 +127,19 @@ private class SimplePropertyProjection extends PropertyProjection::Range {
131
127
override predicate isSingletonProjection ( ) { singleton = true }
132
128
}
133
129
130
+ /**
131
+ * A property projection with a variable number of selector indices.
132
+ */
133
+ private class VarArgsPropertyProjection extends PropertyProjection:: Range {
134
+ VarArgsPropertyProjection ( ) { this = LodashUnderscore:: member ( "pick" ) .getACall ( ) }
135
+
136
+ override DataFlow:: Node getObject ( ) { result = getArgument ( 0 ) }
137
+
138
+ override DataFlow:: Node getASelector ( ) { result = getArgument ( any ( int i | i > 0 ) ) }
139
+
140
+ override predicate isSingletonProjection ( ) { none ( ) }
141
+ }
142
+
134
143
/**
135
144
* A taint step for a property projection.
136
145
*/
You can’t perform that action at this time.
0 commit comments