File tree Expand file tree Collapse file tree 2 files changed +18
-6
lines changed
csharp/ql/test/library-tests/dataflow/flowsources/aspremote Expand file tree Collapse file tree 2 files changed +18
-6
lines changed Original file line number Diff line number Diff line change 11using Microsoft . AspNetCore . Builder ;
22using Microsoft . AspNetCore . Mvc ;
3+ using System ;
34
45namespace Testing
56{
@@ -24,15 +25,24 @@ public object MyAction(ViewModel viewModel)
2425
2526 public class AspRoutingEndpoints
2627 {
28+ public delegate void MapGetHandler ( string delegateparam ) ;
29+
30+ public void HandlerMethod ( string param ) { }
31+
2732 public void M1 ( string [ ] args )
2833 {
2934 var builder = WebApplication . CreateBuilder ( args ) ;
3035 var app = builder . Build ( ) ;
3136
3237 // The delegate parameters are considered flow sources.
3338 app . MapGet ( "/api/redirect/{newUrl}" , ( string newUrl ) => { } ) ;
34- app . MapGet ( "/{myApi}/redirect/{myUrl}" , ( string myApi , string myUrl ) => { } ) ;
39+ app . MapGet ( "/{myApi}/redirect/{myUrl}" , ( string myApi , string myUrl ) => { } ) ;
40+
41+ Action < string > handler = ( string lambdaParam ) => { } ;
42+ app . MapGet ( "/api/redirect/{lambdaParam}" , handler ) ;
3543
44+ MapGetHandler handler2 = HandlerMethod ;
45+ app . MapGet ( "/api/redirect/{param}" , handler2 ) ;
3646 app . Run ( ) ;
3747 }
3848 }
Original file line number Diff line number Diff line change 11remoteFlowSourceMembers
2- | AspRemoteFlowSource.cs:9 :23:9 :31 | RequestId |
2+ | AspRemoteFlowSource.cs:10 :23:10 :31 | RequestId |
33remoteFlowSources
4- | AspRemoteFlowSource.cs:19:42:19:50 | viewModel |
5- | AspRemoteFlowSource.cs:33:58:33:63 | newUrl |
6- | AspRemoteFlowSource.cs:34:61:34:65 | myApi |
7- | AspRemoteFlowSource.cs:34:75:34:79 | myUrl |
4+ | AspRemoteFlowSource.cs:20:42:20:50 | viewModel |
5+ | AspRemoteFlowSource.cs:30:42:30:46 | param |
6+ | AspRemoteFlowSource.cs:38:58:38:63 | newUrl |
7+ | AspRemoteFlowSource.cs:39:61:39:65 | myApi |
8+ | AspRemoteFlowSource.cs:39:75:39:79 | myUrl |
9+ | AspRemoteFlowSource.cs:41:46:41:56 | lambdaParam |
You can’t perform that action at this time.
0 commit comments