JS: Add angular.fromJson as JSON parser

This commit is contained in:
Asger F
2019-09-03 15:30:56 +01:00
parent 5aa948cd17
commit 27567e41c5
3 changed files with 4 additions and 1 deletions

View File

@@ -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")
)
}

View File

@@ -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 |

View File

@@ -0,0 +1 @@
checkJSON(angular.fromJson(input));