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 @@ -126,17 +126,14 @@ module NextJS {
126126 /**
127127 * A step modelling the flow from the server-computed props object to the default exported function that renders the page.
128128 */
129- class NextJSStaticPropsStep extends DataFlow:: AdditionalFlowStep , DataFlow:: FunctionNode {
130- Module pageModule ;
131-
132- NextJSStaticPropsStep ( ) {
133- pageModule = getAPagesModule ( ) and
134- this = pageModule .getAnExportedValue ( "default" ) .getAFunctionValue ( )
135- }
136-
129+ class NextJSStaticPropsStep extends DataFlow:: SharedFlowStep {
137130 override predicate step ( DataFlow:: Node pred , DataFlow:: Node succ ) {
138- pred = getAPropsSource ( pageModule ) and
139- succ = this .getParameter ( 0 )
131+ exists ( Module pageModule , DataFlow:: FunctionNode function |
132+ pageModule = getAPagesModule ( ) and
133+ function = pageModule .getAnExportedValue ( "default" ) .getAFunctionValue ( ) and
134+ pred = getAPropsSource ( pageModule ) and
135+ succ = function .getParameter ( 0 )
136+ )
140137 }
141138 }
142139
You can’t perform that action at this time.
0 commit comments