mirror of
https://github.com/github/codeql.git
synced 2025-12-20 10:46:30 +01:00
JS: Add angular.fromJson as JSON parser
This commit is contained in:
@@ -28,7 +28,8 @@ private class PlainJsonParserCall extends JsonParserCall {
|
||||
callee = DataFlow::globalVarRef("JSON").getAPropertyRead("parse") or
|
||||
callee = DataFlow::moduleImport("parse-json") or
|
||||
callee = DataFlow::moduleImport("json-parse-better-errors") or
|
||||
callee = DataFlow::moduleImport("json-safe-parse")
|
||||
callee = DataFlow::moduleImport("json-safe-parse") or
|
||||
callee = AngularJS::angular().getAPropertyRead("fromJson")
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
| angular.js:1:1:1:34 | checkJS ... input)) | OK |
|
||||
| tst.js:11:1:11:28 | checkJS ... input)) | OK |
|
||||
| tst.js:12:1:12:39 | checkJS ... input)) | OK |
|
||||
| tst.js:13:1:13:53 | checkJS ... input)) | OK |
|
||||
|
||||
1
javascript/ql/test/library-tests/JsonParsers/angular.js
vendored
Normal file
1
javascript/ql/test/library-tests/JsonParsers/angular.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
checkJSON(angular.fromJson(input));
|
||||
Reference in New Issue
Block a user