The request URL is opened as a database connection
Connections.csLine 10public static SqlConnection Open( string connectionString, string tag){ var connection = new SqlConnection( connectionString); Audit .Tag( connection, tag); return connection;···Problem
Export passes url and ReportsDb to Open the wrong way round, so the request’s URL reaches new SqlConnection as its connection string.
Impact
Whoever sends the request chooses the database server the export connects to, and the reports database’s settings are recorded as the connection’s tag instead.
Recommended solution
Call Open(ReportsDb, url), and give Open named arguments or a settings type so the two strings can’t be swapped again.
Why this was flagged
Check
Resource injection matched Connections.cs:10.
Source read for this finding
Connections.cs:8-13ReportsController.cs:13-18
Independent review
Kept with high confidence. The request’s display URL reaches the SqlConnection constructor in Connections.cs.