Files
codeql/javascript/ql/test/query-tests/Security/CWE-312/tst-angularjs.js
2018-08-02 17:53:23 +01:00

12 lines
486 B
JavaScript

angular.module("app")
.controller("controller", function($cacheFactory, $templateCache, $cookies){
$cacheFactory.put("x", data1.password); // NOT OK
$templateCache.put("x", data2.password); // NOT OK
$cookies.put("x", data3.password); // NOT OK
$cookies.putObject("x", data4.password); // NOT OK
$cookies.other("x", data5.password); // OK
other.put("x", data6.password); // OK
$cookies.put(data7.password, "x"); // OK
})