File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
javascript/ql/src/Security/CWE-400 Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,13 @@ abstract class EnumeratedPropName extends DataFlow::Node {
4848 */
4949 abstract DataFlow:: Node getSourceObject ( ) ;
5050
51+ /**
52+ * Gets a source node that refers to the object whose properties are being enumerated.
53+ */
54+ DataFlow:: SourceNode getASourceObjectRef ( ) {
55+ result = AccessPath:: getAnAliasedSourceNode ( getSourceObject ( ) )
56+ }
57+
5158 /**
5259 * Gets a property read that accesses the corresponding property value in the source object.
5360 *
@@ -56,7 +63,7 @@ abstract class EnumeratedPropName extends DataFlow::Node {
5663 SourceNode getASourceProp ( ) {
5764 exists ( Node base , Node key |
5865 dynamicPropReadStep ( base , key , result ) and
59- AccessPath :: getAnAliasedSourceNode ( getSourceObject ( ) ) .flowsTo ( base ) and
66+ getASourceObjectRef ( ) .flowsTo ( base ) and
6067 key .getImmediatePredecessor * ( ) = this
6168 )
6269 }
@@ -117,7 +124,7 @@ class EntriesEnumeratedPropName extends EnumeratedPropName {
117124 * Holds if the properties of `node` are enumerated locally.
118125 */
119126predicate arePropertiesEnumerated ( DataFlow:: SourceNode node ) {
120- node = AccessPath :: getAnAliasedSourceNode ( any ( EnumeratedPropName name ) .getSourceObject ( ) )
127+ node = any ( EnumeratedPropName name ) .getASourceObjectRef ( )
121128}
122129
123130/**
You can’t perform that action at this time.
0 commit comments