@@ -57,11 +57,11 @@ private static class SetStringSource {
5757 static PathSegment taint (PathSegment ps ) { return ps ; }
5858
5959 static UriInfo taint (UriInfo ui ) { return ui ; }
60-
60+
6161 static Map taint (Map m ) { return m ; }
62-
62+
6363 static Link taint (Link l ) { return l ; }
64-
64+
6565 static Class taint (Class c ) { return c ; }
6666
6767 private static class UriSource {
@@ -196,12 +196,16 @@ void testPathSegment(PathSegment ps1, PathSegment ps2) {
196196 sink (taint (ps2 ).getPath ()); // $ hasTaintFlow
197197 }
198198
199- void testUriInfo (UriInfo ui1 , UriInfo ui2 , UriInfo ui3 , UriInfo ui4 , UriInfo ui5 ) {
200- sink (taint (ui1 ).getPathParameters ()); // $ hasTaintFlow
201- sink (taint (ui2 ).getPathSegments ()); // $ hasTaintFlow
202- sink (taint (ui2 ).getQueryParameters ()); // $ hasTaintFlow
203- sink (taint (ui2 ).getRequestUri ()); // $ hasTaintFlow
204- sink (taint (ui2 ).getRequestUriBuilder ()); // $ hasTaintFlow
199+ void testUriInfo (UriInfo ui ) {
200+ ui = taint (ui );
201+ sink (ui .getPathParameters ()); // $ hasTaintFlow
202+ sink (ui .getPathSegments ()); // $ hasTaintFlow
203+ sink (ui .getQueryParameters ()); // $ hasTaintFlow
204+ sink (ui .getRequestUri ()); // $ hasTaintFlow
205+ sink (ui .getRequestUriBuilder ()); // $ hasTaintFlow
206+ sink (ui .getQueryParameters ().getFirst ("someKey" )); // $ hasTaintFlow
207+ sink (ui .getRequestUri ()); // $ hasTaintFlow
208+ sink (ui .getRequestUriBuilder ().build ()); // $ hasTaintFlow
205209 }
206210
207211 void testCookie () {
@@ -341,7 +345,7 @@ void testUriBuilder() throws Exception {
341345 sink (UriBuilder .fromPath (taint ()).buildFromEncodedMap (new HashMap <String , String >())); // $ hasTaintFlow
342346 sink (UriBuilder .fromPath ("" ).buildFromMap (taint (new HashMap <String , String >()), false )); // $ hasTaintFlow
343347 sink (UriBuilder .fromPath (taint ()).buildFromMap (new HashMap <String , String >(), true )); // $ hasTaintFlow
344-
348+
345349 sink (UriBuilder .fromPath (taint ()).clone ()); // $ hasTaintFlow
346350 sink (UriBuilder .fromPath ("" ).fragment (taint ())); // $ hasTaintFlow
347351 sink (UriBuilder .fromPath (taint ()).fragment ("" )); // $ hasTaintFlow
0 commit comments