@@ -7,7 +7,7 @@ var promiseWarning;
7
7
// Sandboxing Angular Expressions
8
8
// ------------------------------
9
9
// Angular expressions are generally considered safe because these expressions only have direct
10
- // access to $scope and locals. However, one can obtain the ability to execute arbitrary JS code by
10
+ // access to ` $scope` and locals. However, one can obtain the ability to execute arbitrary JS code by
11
11
// obtaining a reference to native JS functions such as the Function constructor.
12
12
//
13
13
// As an example, consider the following Angular expression:
@@ -16,14 +16,16 @@ var promiseWarning;
16
16
//
17
17
// This sandboxing technique is not perfect and doesn't aim to be. The goal is to prevent exploits
18
18
// against the expression language, but not to prevent exploits that were enabled by exposing
19
- // sensitive JavaScript or browser apis on Scope. Exposing such objects on a Scope is never a good
19
+ // sensitive JavaScript or browser APIs on Scope. Exposing such objects on a Scope is never a good
20
20
// practice and therefore we are not even trying to protect against interaction with an object
21
21
// explicitly exposed in this way.
22
22
//
23
23
// In general, it is not possible to access a Window object from an angular expression unless a
24
24
// window or some DOM object that has a reference to window is published onto a Scope.
25
25
// Similarly we prevent invocations of function known to be dangerous, as well as assignments to
26
26
// native objects.
27
+ //
28
+ // See https://docs.angularjs.org/guide/security
27
29
28
30
29
31
function ensureSafeMemberName ( name , fullExpression ) {
0 commit comments