From 38deedd6e3d806eb8262bb43f26d47245f6c2739 Mon Sep 17 00:00:00 2001 From: Chirayu Krishnappa Date: Fri, 21 Jun 2013 19:00:45 -0700 Subject: [PATCH] fix($compile): reject multi-expression interpolations for src attribute BREAKING CHANGE: Concatenating expressions makes it hard to reason about whether some combination of concatenated values are unsafe to use and could easily lead to XSS. By requiring that a single expression be used for *[src/ng-src] such as iframe[src], object[src], etc. (but not img[src/ng-src] since that value is sanitized), we ensure that the value that's used is assigned or constructed by some JS code somewhere that is more testable or make it obvious that you bound the value to some user controlled value. This helps reduce the load when auditing for XSS issues. To migrate your code, follow the example below: Before: JS: scope.baseUrl = 'page'; scope.a = 1; scope.b = 2; HTML: