angular/angular.js — pull request #10355 by jbedard (2014-12-06 21:45:04+00:00)
Title: fix($parse): ensuring shared sub expressions do not use full expression text

This depends on #10351 otherwise some of the changed error messages would be even shorter (tests will probably fail for now showing why...).

I guess this is debatable but I don't think anything shared (just `getterFn`s really...) should reference the `fullExp` which created it when it might be used by other expressions. For example (without this patch):
```
$rootScope.$eval('foo.constructor + 123') => 123
$rootScope.$eval('foo.constructor.foo()', {foo: Function}) =>
[$parse:isecfn] Referencing Function in Angular expressions is disallowed! Expression: foo.constructor + 123
```

This patch changes it so the shared `getterFn` only references the shared path itself. While seeing the full expression would be nicer at least for now it won't be wrong.

This was caused by e676d642f5feb8d3ba88944634afb479ba525c36 and also exists in 1.2 from the same security fix.