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