This repository has been archived by the owner on Apr 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix($parse): disallow access to window and dom in expressions
- Loading branch information
Showing
4 changed files
with
175 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
@ngdoc error | ||
@name $parse:isecdom | ||
@fullName Referencing a DOM node in Expression | ||
@description | ||
|
||
Occurs when an expression attempts to access a DOM node. | ||
|
||
AngularJS restricts access to DOM nodes from within expressions since it's a known way to | ||
execute arbitrary Javascript code. | ||
|
||
This check is only performed on object index and function calls in Angular expressions. These are | ||
places that are harder for the developer to guard. Dotted member access (such as a.b.c) does not | ||
perform this check - it's up to the developer to not expose such sensitive and powerful objects | ||
directly on the scope chain. | ||
|
||
To resolve this error, avoid access to DOM nodes. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
@ngdoc error | ||
@name $parse:isecwindow | ||
@fullName Referencing Window object in Expression | ||
@description | ||
|
||
Occurs when an expression attempts to access a Window object. | ||
|
||
AngularJS restricts access to the Window object from within expressions since it's a known way to | ||
execute arbitrary Javascript code. | ||
|
||
This check is only performed on object index and function calls in Angular expressions. These are | ||
places that are harder for the developer to guard. Dotted member access (such as a.b.c) does not | ||
perform this check - it's up to the developer to not expose such sensitive and powerful objects | ||
directly on the scope chain. | ||
|
||
To resolve this error, avoid Window access. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters