File tree Expand file tree Collapse file tree
javascript/ql/src/semmle/javascript/frameworks Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -140,20 +140,14 @@ module NextJS {
140140 /**
141141 * A step modelling the flow from the server-computed props object to the default exported React component that renders the page.
142142 */
143- class NextJSStaticReactComponentPropsStep extends DataFlow:: AdditionalFlowStep ,
144- DataFlow:: ValueNode {
145- Module pageModule ;
146- ReactComponent component ;
147-
148- NextJSStaticReactComponentPropsStep ( ) {
149- pageModule = getAPagesModule ( ) and
150- this .getAstNode ( ) = component and
151- this = pageModule .getAnExportedValue ( "default" ) .getALocalSource ( )
152- }
153-
143+ class NextJSStaticReactComponentPropsStep extends DataFlow:: SharedFlowStep {
154144 override predicate step ( DataFlow:: Node pred , DataFlow:: Node succ ) {
155- pred = getAPropsSource ( pageModule ) and
156- succ = component .getADirectPropsAccess ( )
145+ exists ( Module pageModule , ReactComponent component |
146+ pageModule = getAPagesModule ( ) and
147+ pageModule .getAnExportedValue ( "default" ) .getALocalSource ( ) = DataFlow:: valueNode ( component ) and
148+ pred = getAPropsSource ( pageModule ) and
149+ succ = component .getADirectPropsAccess ( )
150+ )
157151 }
158152 }
159153
You can’t perform that action at this time.
0 commit comments