File tree Expand file tree Collapse file tree 5 files changed +2343
-61
lines changed
library-tests/frameworks/JsonNET Expand file tree Collapse file tree 5 files changed +2343
-61
lines changed Original file line number Diff line number Diff line change 1- // semmle-extractor-options: ${testdir}/ ../../../resources/stubs/JsonNET.cs /r:System.Linq.dll
1+ // semmle-extractor-options: /nostdlib /noconfig --load-sources-from-project: ../../../resources/stubs/Newtonsoft.Json/13.0.1/Newtonsoft.Json.csproj
22
33using Newtonsoft . Json ;
44using Newtonsoft . Json . Linq ;
@@ -47,14 +47,14 @@ void F()
4747 Sink ( ( string ) jobject [ "1" ] [ "2" ] ) ;
4848
4949 // Linq JToken tests
50- Sink ( jobject . First ( i => true ) ) ;
50+ Sink ( jobject . First ( ( JToken i ) => true ) ) ;
5151 Sink ( jobject [ "2" ] . First ( i => true ) ) ;
5252 Sink ( jobject [ "2" ] [ "3" ] . First ( i => true ) ) ;
5353 Sink ( jobject . SelectToken ( "Manufacturers[0].Name" ) ) ;
5454
5555 JObject untaintedJObject = JObject . Parse ( u ) ;
5656 Sink ( untaintedJObject ) ;
57- Sink ( untaintedJObject . First ( i => true ) ) ;
57+ Sink ( untaintedJObject . First ( ( JToken i ) => true ) ) ;
5858 }
5959
6060 public class Object
@@ -64,7 +64,7 @@ public class Object
6464 [ JsonIgnore ]
6565 public int untainted ;
6666
67- public Dictionary < string , string > taintedValues ;
67+ public Dictionary < string , string > taintedValues ;
6868
6969 public string [ ] taintedArray ;
7070 }
Original file line number Diff line number Diff line change 99| Json.cs:18:24:18:32 | "tainted" | Json.cs:45:18:45:29 | access to indexer |
1010| Json.cs:18:24:18:32 | "tainted" | Json.cs:46:18:46:34 | access to indexer |
1111| Json.cs:18:24:18:32 | "tainted" | Json.cs:47:18:47:42 | call to operator explicit conversion |
12- | Json.cs:18:24:18:32 | "tainted" | Json.cs:50:18:50:41 | call to method First |
12+ | Json.cs:18:24:18:32 | "tainted" | Json.cs:50:18:50:50 | call to method First |
1313| Json.cs:18:24:18:32 | "tainted" | Json.cs:51:18:51:46 | call to method First |
1414| Json.cs:18:24:18:32 | "tainted" | Json.cs:52:18:52:51 | call to method First |
1515| Json.cs:18:24:18:32 | "tainted" | Json.cs:53:18:53:61 | call to method SelectToken |
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments