angular.js/test
Chirayu Krishnappa 3d6a89e888 feat($parse): secure expressions by hiding "private" properties
BREAKING CHANGE:
This commit introduces the notion of "private" properties (properties
whose names begin and/or end with an underscore) on the scope chain.
These properties will not be available to Angular expressions (i.e. {{
}} interpolation in templates and strings passed to `$parse`)  They are
freely available to JavaScript code (as before).

Motivation
----------
Angular expressions execute in a limited context.  They do not have
direct access to the global scope, Window, Document or the Function
constructor.  However, they have direct access to names/properties on
the scope chain.  It has been a long standing best practice to keep
sensitive APIs outside of the scope chain (in a closure or your
controller.)  That's easier said that done for two reasons: (1)
JavaScript does not have a notion of private properties so if you need
someone on the scope chain for JavaScript use, you also expose it to
Angular expressions, and (2) the new "controller as" syntax that's now
in increased usage exposes the entire controller on the scope chain
greatly increaing the exposed surface.  Though Angular expressions are
written and controlled by the developer, they (1) typically deal with
user input and (2) don't get the kind of test coverage that JavaScript
code would.  This commit provides a way, via a naming convention, to
allow publishing/restricting properties from controllers/scopes to
Angular expressions enabling one to only expose those properties that
are actually needed by the expressions.
2013-10-30 17:01:51 -07:00
..
auto style(injectorSpec): fix typo in "it" description 2013-10-25 21:52:46 +01:00
helpers fix(modules): stop leaking global variables in tests 2013-10-10 11:58:15 -07:00
ng feat($parse): secure expressions by hiding "private" properties 2013-10-30 17:01:51 -07:00
ngAnimate fix($animate): use direct DOM comparison when checking for $rootElement 2013-10-28 22:47:47 -07:00
ngCookies feat($cookieStore): $cookieStore.get now parses blank string as blank string 2013-05-08 10:04:07 +01:00
ngMock fix(modules): stop leaking global variables in tests 2013-10-10 11:58:15 -07:00
ngResource fix(*): protect calls to hasOwnProperty in public API 2013-10-07 09:01:13 -07:00
ngRoute fix(ngView): ensure the new view element is placed after the old view element 2013-10-23 10:30:45 -07:00
ngSanitize fix($sanitize): sanitize DOCTYPE declarations correctly 2013-10-03 08:42:15 +01:00
ngScenario test($browser): correct false positive in ApplicationSpec.js 2013-09-11 22:19:24 +01:00
ngTouch fix(ngTouch): add $event to ng-swipe 2013-10-08 12:55:16 +01:00
AngularSpec.js fix(csp): fix csp auto-detection and stylesheet injection 2013-10-18 17:33:53 -07:00
ApiSpecs.js feat(ngRepeat): add support for custom tracking of items 2013-03-29 23:01:52 -07:00
BinderSpec.js feat(ngRepeat): use block separator comments 2013-10-09 15:19:10 -07:00
jqLiteSpec.js fix(jqLite): ignore class methods on comment elements 2013-10-09 15:19:10 -07:00
jquery_alias.js fix(specs): fix jQuery to jqLite binding on IE8 2011-09-16 02:44:33 +02:00
jquery_remove.js fix(specs): fix jQuery to jqLite binding on IE8 2011-09-16 02:44:33 +02:00
jQueryPatchSpec.js feat(jqLite): switch bind/unbind to more recent jQuery on/off 2013-06-19 20:53:24 +01:00
loaderSpec.js fix(*): protect calls to hasOwnProperty in public API 2013-10-07 09:01:13 -07:00
minErrSpec.js feat(minerr): log minerr doc url in development 2013-08-15 13:23:18 -07:00