File tree Expand file tree Collapse file tree 3 files changed +13
-3
lines changed
src/semmle/javascript/frameworks
test/library-tests/frameworks/Next Expand file tree Collapse file tree 3 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ private module NextJS {
74
74
(
75
75
pred =
76
76
pageModule
77
- .getAnExportedValue ( "getStaticProps" )
77
+ .getAnExportedValue ( [ "getStaticProps" , "getServerSideProps" ] )
78
78
.getAFunctionValue ( )
79
79
.getAReturn ( )
80
80
.getALocalSource ( )
Original file line number Diff line number Diff line change @@ -15,12 +15,21 @@ export async function getStaticProps({ params }) {
15
15
}
16
16
}
17
17
18
- export default function Post ( { taint, stars } ) {
18
+ export default function Post ( { taint, stars, more } ) {
19
19
sink ( taint ) ;
20
20
sink ( stars ) ;
21
+ sink ( more ) ;
21
22
return < span /> ;
22
23
}
23
24
24
25
Post . getInitialProps = async ( ctx ) => {
25
26
return { stars : source ( 2 ) }
27
+ }
28
+
29
+ export async function getServerSideProps ( ctx ) {
30
+ return {
31
+ props : {
32
+ more : source ( 3 )
33
+ }
34
+ }
26
35
}
Original file line number Diff line number Diff line change @@ -2,4 +2,5 @@ remoteFlow
2
2
| pages/[my-fallback-id].jsx:9:40:9:45 | params |
3
3
dataFlow
4
4
| pages/[my-fallback-id].jsx:13:20:13:27 | source() | pages/[my-fallback-id].jsx:19:10:19:14 | taint |
5
- | pages/[my-fallback-id].jsx:25:21:25:29 | source(2) | pages/[my-fallback-id].jsx:20:10:20:14 | stars |
5
+ | pages/[my-fallback-id].jsx:26:21:26:29 | source(2) | pages/[my-fallback-id].jsx:20:10:20:14 | stars |
6
+ | pages/[my-fallback-id].jsx:32:19:32:27 | source(3) | pages/[my-fallback-id].jsx:21:10:21:13 | more |
You can’t perform that action at this time.
0 commit comments