@angular/compiler 13.3.11 → 13.3.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/src/render3/partial/class_metadata.mjs +1 -1
- package/esm2020/src/render3/partial/directive.mjs +1 -1
- package/esm2020/src/render3/partial/factory.mjs +1 -1
- package/esm2020/src/render3/partial/injectable.mjs +1 -1
- package/esm2020/src/render3/partial/injector.mjs +1 -1
- package/esm2020/src/render3/partial/ng_module.mjs +1 -1
- package/esm2020/src/render3/partial/pipe.mjs +1 -1
- package/esm2020/src/render3/r3_identifiers.mjs +2 -1
- package/esm2020/src/render3/view/compiler.mjs +16 -1
- package/esm2020/src/render3/view/template.mjs +17 -3
- package/esm2020/src/schema/dom_security_schema.mjs +20 -1
- package/esm2020/src/version.mjs +1 -1
- package/fesm2015/compiler.mjs +117 -70
- package/fesm2015/compiler.mjs.map +1 -1
- package/fesm2015/testing.mjs +1 -1
- package/fesm2020/compiler.mjs +117 -70
- package/fesm2020/compiler.mjs.map +1 -1
- package/fesm2020/testing.mjs +1 -1
- package/package.json +1 -1
- package/src/render3/r3_identifiers.d.ts +1 -0
- package/src/schema/dom_security_schema.d.ts +15 -0
|
@@ -57,4 +57,23 @@ function registerContext(ctx, specs) {
|
|
|
57
57
|
for (const spec of specs)
|
|
58
58
|
_SECURITY_SCHEMA[spec.toLowerCase()] = ctx;
|
|
59
59
|
}
|
|
60
|
-
|
|
60
|
+
/**
|
|
61
|
+
* The set of security-sensitive attributes of an `<iframe>` that *must* be
|
|
62
|
+
* applied as a static attribute only. This ensures that all security-sensitive
|
|
63
|
+
* attributes are taken into account while creating an instance of an `<iframe>`
|
|
64
|
+
* at runtime.
|
|
65
|
+
*
|
|
66
|
+
* Note: avoid using this set directly, use the `isIframeSecuritySensitiveAttr` function
|
|
67
|
+
* in the code instead.
|
|
68
|
+
*/
|
|
69
|
+
export const IFRAME_SECURITY_SENSITIVE_ATTRS = new Set(['sandbox', 'allow', 'allowfullscreen', 'referrerpolicy', 'csp', 'fetchpriority']);
|
|
70
|
+
/**
|
|
71
|
+
* Checks whether a given attribute name might represent a security-sensitive
|
|
72
|
+
* attribute of an <iframe>.
|
|
73
|
+
*/
|
|
74
|
+
export function isIframeSecuritySensitiveAttr(attrName) {
|
|
75
|
+
// The `setAttribute` DOM API is case-insensitive, so we lowercase the value
|
|
76
|
+
// before checking it against a known security-sensitive attributes.
|
|
77
|
+
return IFRAME_SECURITY_SENSITIVE_ATTRS.has(attrName.toLowerCase());
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZG9tX3NlY3VyaXR5X3NjaGVtYS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL2NvbXBpbGVyL3NyYy9zY2hlbWEvZG9tX3NlY3VyaXR5X3NjaGVtYS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7O0dBTUc7QUFFSCxPQUFPLEVBQUMsZUFBZSxFQUFDLE1BQU0sU0FBUyxDQUFDO0FBRXhDLG9HQUFvRztBQUNwRyxvR0FBb0c7QUFDcEcsb0dBQW9HO0FBQ3BHLG9HQUFvRztBQUNwRyxvR0FBb0c7QUFDcEcsRUFBRTtBQUNGLDJGQUEyRjtBQUMzRixrRUFBa0U7QUFDbEUsRUFBRTtBQUNGLG9HQUFvRztBQUVwRyxpR0FBaUc7QUFDakcsSUFBSSxnQkFBaUQsQ0FBQztBQUV0RCxNQUFNLFVBQVUsZUFBZTtJQUM3QixJQUFJLENBQUMsZ0JBQWdCLEVBQUU7UUFDckIsZ0JBQWdCLEdBQUcsRUFBRSxDQUFDO1FBQ3RCLDJGQUEyRjtRQUUzRixlQUFlLENBQUMsZUFBZSxDQUFDLElBQUksRUFBRTtZQUNwQyxlQUFlO1lBQ2YsYUFBYTtZQUNiLG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sQ0FBQyxDQUFDLFNBQVMsRUFBRSxPQUFPLEVBQUUsaUJBQWlCLEVBQUUsZ0JBQWdCLEVBQUUsS0FBSyxFQUFFLGVBQWUsQ0FBQyxDQUFDLENBQUM7QUFFL0Y7OztHQUdHO0FBQ0gsTUFBTSxVQUFVLDZCQUE2QixDQUFDLFFBQWdCO0lBQzVELDRFQUE0RTtJQUM1RSxvRUFBb0U7SUFDcEUsT0FBTywrQkFBK0IsQ0FBQyxHQUFHLENBQUMsUUFBUSxDQUFDLFdBQVcsRUFBRSxDQUFDLENBQUM7QUFDckUsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogQGxpY2Vuc2VcbiAqIENvcHlyaWdodCBHb29nbGUgTExDIEFsbCBSaWdodHMgUmVzZXJ2ZWQuXG4gKlxuICogVXNlIG9mIHRoaXMgc291cmNlIGNvZGUgaXMgZ292ZXJuZWQgYnkgYW4gTUlULXN0eWxlIGxpY2Vuc2UgdGhhdCBjYW4gYmVcbiAqIGZvdW5kIGluIHRoZSBMSUNFTlNFIGZpbGUgYXQgaHR0cHM6Ly9hbmd1bGFyLmlvL2xpY2Vuc2VcbiAqL1xuXG5pbXBvcnQge1NlY3VyaXR5Q29udGV4dH0gZnJvbSAnLi4vY29yZSc7XG5cbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vID09PT09PT09PT09IFMgVCBPIFAgICAtICBTIFQgTyBQICAgLSAgUyBUIE8gUCAgIC0gIFMgVCBPIFAgICAtICBTIFQgTyBQICAgLSAgUyBUIE8gUCAgPT09PT09PT09PT1cbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vXG4vLyAgICAgICAgRE8gTk9UIEVESVQgVEhJUyBMSVNUIE9GIFNFQ1VSSVRZIFNFTlNJVElWRSBQUk9QRVJUSUVTIFdJVEhPVVQgQSBTRUNVUklUWSBSRVZJRVchXG4vLyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBSZWFjaCBvdXQgdG8gbXByb2JzdCBmb3IgZGV0YWlscy5cbi8vXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG5cbi8qKiBNYXAgZnJvbSB0YWdOYW1lfHByb3BlcnR5TmFtZSB0byBTZWN1cml0eUNvbnRleHQuIFByb3BlcnRpZXMgYXBwbHlpbmcgdG8gYWxsIHRhZ3MgdXNlICcqJy4gKi9cbmxldCBfU0VDVVJJVFlfU0NIRU1BIToge1trOiBzdHJpbmddOiBTZWN1cml0eUNvbnRleHR9O1xuXG5leHBvcnQgZnVuY3Rpb24gU0VDVVJJVFlfU0NIRU1BKCk6IHtbazogc3RyaW5nXTogU2VjdXJpdHlDb250ZXh0fSB7XG4gIGlmICghX1NFQ1VSSVRZX1NDSEVNQSkge1xuICAgIF9TRUNVUklUWV9TQ0hFTUEgPSB7fTtcbiAgICAvLyBDYXNlIGlzIGluc2lnbmlmaWNhbnQgYmVsb3csIGFsbCBlbGVtZW50IGFuZCBhdHRyaWJ1dGUgbmFtZXMgYXJlIGxvd2VyLWNhc2VkIGZvciBsb29rdXAuXG5cbiAgICByZWdpc3RlckNvbnRleHQoU2VjdXJpdHlDb250ZXh0LkhUTUwsIFtcbi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bG93JywgJ2FsbG93ZnVsbHNjcmVlbicsICdyZWZlcnJlcnBvbGljeScsICdjc3AnLCAnZmV0Y2hwcmlvcml0eSddKTtcblxuLyoqXG4gKiBDaGVja3Mgd2hldGhlciBhIGdpdmVuIGF0dHJpYnV0ZSBuYW1lIG1pZ2h0IHJlcHJlc2VudCBhIHNlY3VyaXR5LXNlbnNpdGl2ZVxuICogYXR0cmlidXRlIG9mIGFuIDxpZnJhbWU+LlxuICovXG5leHBvcnQgZnVuY3Rpb24gaXNJZnJhbWVTZWN1cml0eVNlbnNpdGl2ZUF0dHIoYXR0ck5hbWU6IHN0cmluZyk6IGJvb2xlYW4ge1xuICAvLyBUaGUgYHNldEF0dHJpYnV0ZWAgRE9NIEFQSSBpcyBjYXNlLWluc2Vuc2l0aXZlLCBzbyB3ZSBsb3dlcmNhc2UgdGhlIHZhbHVlXG4gIC8vIGJlZm9yZSBjaGVja2luZyBpdCBhZ2FpbnN0IGEga25vd24gc2VjdXJpdHktc2Vuc2l0aXZlIGF0dHJpYnV0ZXMuXG4gIHJldHVybiBJRlJBTUVfU0VDVVJJVFlfU0VOU0lUSVZFX0FUVFJTLmhhcyhhdHRyTmFtZS50b0xvd2VyQ2FzZSgpKTtcbn1cbiJdfQ==
|
package/esm2020/src/version.mjs
CHANGED
|
@@ -11,5 +11,5 @@
|
|
|
11
11
|
* Entry point for all public APIs of the compiler package.
|
|
12
12
|
*/
|
|
13
13
|
import { Version } from './util';
|
|
14
|
-
export const VERSION = new Version('13.3.
|
|
14
|
+
export const VERSION = new Version('13.3.12');
|
|
15
15
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmVyc2lvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL2NvbXBpbGVyL3NyYy92ZXJzaW9uLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7R0FNRztBQUVIOzs7O0dBSUc7QUFFSCxPQUFPLEVBQUMsT0FBTyxFQUFDLE1BQU0sUUFBUSxDQUFDO0FBRS9CLE1BQU0sQ0FBQyxNQUFNLE9BQU8sR0FBRyxJQUFJLE9BQU8sQ0FBQyxtQkFBbUIsQ0FBQyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBAbGljZW5zZVxuICogQ29weXJpZ2h0IEdvb2dsZSBMTEMgQWxsIFJpZ2h0cyBSZXNlcnZlZC5cbiAqXG4gKiBVc2Ugb2YgdGhpcyBzb3VyY2UgY29kZSBpcyBnb3Zlcm5lZCBieSBhbiBNSVQtc3R5bGUgbGljZW5zZSB0aGF0IGNhbiBiZVxuICogZm91bmQgaW4gdGhlIExJQ0VOU0UgZmlsZSBhdCBodHRwczovL2FuZ3VsYXIuaW8vbGljZW5zZVxuICovXG5cbi8qKlxuICogQG1vZHVsZVxuICogQGRlc2NyaXB0aW9uXG4gKiBFbnRyeSBwb2ludCBmb3IgYWxsIHB1YmxpYyBBUElzIG9mIHRoZSBjb21waWxlciBwYWNrYWdlLlxuICovXG5cbmltcG9ydCB7VmVyc2lvbn0gZnJvbSAnLi91dGlsJztcblxuZXhwb3J0IGNvbnN0IFZFUlNJT04gPSBuZXcgVmVyc2lvbignMC4wLjAtUExBQ0VIT0xERVInKTtcbiJdfQ==
|
package/fesm2015/compiler.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v13.3.
|
|
2
|
+
* @license Angular v13.3.12
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -2937,6 +2937,7 @@ Identifiers.sanitizeUrl = { name: 'ɵɵsanitizeUrl', moduleName: CORE };
|
|
|
2937
2937
|
Identifiers.sanitizeUrlOrResourceUrl = { name: 'ɵɵsanitizeUrlOrResourceUrl', moduleName: CORE };
|
|
2938
2938
|
Identifiers.trustConstantHtml = { name: 'ɵɵtrustConstantHtml', moduleName: CORE };
|
|
2939
2939
|
Identifiers.trustConstantResourceUrl = { name: 'ɵɵtrustConstantResourceUrl', moduleName: CORE };
|
|
2940
|
+
Identifiers.validateIframeAttribute = { name: 'ɵɵvalidateIframeAttribute', moduleName: CORE };
|
|
2940
2941
|
|
|
2941
2942
|
/**
|
|
2942
2943
|
* @license
|
|
@@ -7656,6 +7657,84 @@ class BuiltinFunctionCall extends Call {
|
|
|
7656
7657
|
}
|
|
7657
7658
|
}
|
|
7658
7659
|
|
|
7660
|
+
/**
|
|
7661
|
+
* @license
|
|
7662
|
+
* Copyright Google LLC All Rights Reserved.
|
|
7663
|
+
*
|
|
7664
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
7665
|
+
* found in the LICENSE file at https://angular.io/license
|
|
7666
|
+
*/
|
|
7667
|
+
// =================================================================================================
|
|
7668
|
+
// =================================================================================================
|
|
7669
|
+
// =========== S T O P - S T O P - S T O P - S T O P - S T O P - S T O P ===========
|
|
7670
|
+
// =================================================================================================
|
|
7671
|
+
// =================================================================================================
|
|
7672
|
+
//
|
|
7673
|
+
// DO NOT EDIT THIS LIST OF SECURITY SENSITIVE PROPERTIES WITHOUT A SECURITY REVIEW!
|
|
7674
|
+
// Reach out to mprobst for details.
|
|
7675
|
+
//
|
|
7676
|
+
// =================================================================================================
|
|
7677
|
+
/** Map from tagName|propertyName to SecurityContext. Properties applying to all tags use '*'. */
|
|
7678
|
+
let _SECURITY_SCHEMA;
|
|
7679
|
+
function SECURITY_SCHEMA() {
|
|
7680
|
+
if (!_SECURITY_SCHEMA) {
|
|
7681
|
+
_SECURITY_SCHEMA = {};
|
|
7682
|
+
// Case is insignificant below, all element and attribute names are lower-cased for lookup.
|
|
7683
|
+
registerContext(SecurityContext.HTML, [
|
|
7684
|
+
'iframe|srcdoc',
|
|
7685
|
+
'*|innerHTML',
|
|
7686
|
+
'*|outerHTML',
|
|
7687
|
+
]);
|
|
7688
|
+
registerContext(SecurityContext.STYLE, ['*|style']);
|
|
7689
|
+
// NB: no SCRIPT contexts here, they are never allowed due to the parser stripping them.
|
|
7690
|
+
registerContext(SecurityContext.URL, [
|
|
7691
|
+
'*|formAction', 'area|href', 'area|ping', 'audio|src', 'a|href',
|
|
7692
|
+
'a|ping', 'blockquote|cite', 'body|background', 'del|cite', 'form|action',
|
|
7693
|
+
'img|src', 'img|srcset', 'input|src', 'ins|cite', 'q|cite',
|
|
7694
|
+
'source|src', 'source|srcset', 'track|src', 'video|poster', 'video|src',
|
|
7695
|
+
]);
|
|
7696
|
+
registerContext(SecurityContext.RESOURCE_URL, [
|
|
7697
|
+
'applet|code',
|
|
7698
|
+
'applet|codebase',
|
|
7699
|
+
'base|href',
|
|
7700
|
+
'embed|src',
|
|
7701
|
+
'frame|src',
|
|
7702
|
+
'head|profile',
|
|
7703
|
+
'html|manifest',
|
|
7704
|
+
'iframe|src',
|
|
7705
|
+
'link|href',
|
|
7706
|
+
'media|src',
|
|
7707
|
+
'object|codebase',
|
|
7708
|
+
'object|data',
|
|
7709
|
+
'script|src',
|
|
7710
|
+
]);
|
|
7711
|
+
}
|
|
7712
|
+
return _SECURITY_SCHEMA;
|
|
7713
|
+
}
|
|
7714
|
+
function registerContext(ctx, specs) {
|
|
7715
|
+
for (const spec of specs)
|
|
7716
|
+
_SECURITY_SCHEMA[spec.toLowerCase()] = ctx;
|
|
7717
|
+
}
|
|
7718
|
+
/**
|
|
7719
|
+
* The set of security-sensitive attributes of an `<iframe>` that *must* be
|
|
7720
|
+
* applied as a static attribute only. This ensures that all security-sensitive
|
|
7721
|
+
* attributes are taken into account while creating an instance of an `<iframe>`
|
|
7722
|
+
* at runtime.
|
|
7723
|
+
*
|
|
7724
|
+
* Note: avoid using this set directly, use the `isIframeSecuritySensitiveAttr` function
|
|
7725
|
+
* in the code instead.
|
|
7726
|
+
*/
|
|
7727
|
+
const IFRAME_SECURITY_SENSITIVE_ATTRS = new Set(['sandbox', 'allow', 'allowfullscreen', 'referrerpolicy', 'csp', 'fetchpriority']);
|
|
7728
|
+
/**
|
|
7729
|
+
* Checks whether a given attribute name might represent a security-sensitive
|
|
7730
|
+
* attribute of an <iframe>.
|
|
7731
|
+
*/
|
|
7732
|
+
function isIframeSecuritySensitiveAttr(attrName) {
|
|
7733
|
+
// The `setAttribute` DOM API is case-insensitive, so we lowercase the value
|
|
7734
|
+
// before checking it against a known security-sensitive attributes.
|
|
7735
|
+
return IFRAME_SECURITY_SENSITIVE_ATTRS.has(attrName.toLowerCase());
|
|
7736
|
+
}
|
|
7737
|
+
|
|
7659
7738
|
/**
|
|
7660
7739
|
* @license
|
|
7661
7740
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -14482,65 +14561,6 @@ function mapLiteral(obj, quoted = false) {
|
|
|
14482
14561
|
})));
|
|
14483
14562
|
}
|
|
14484
14563
|
|
|
14485
|
-
/**
|
|
14486
|
-
* @license
|
|
14487
|
-
* Copyright Google LLC All Rights Reserved.
|
|
14488
|
-
*
|
|
14489
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
14490
|
-
* found in the LICENSE file at https://angular.io/license
|
|
14491
|
-
*/
|
|
14492
|
-
// =================================================================================================
|
|
14493
|
-
// =================================================================================================
|
|
14494
|
-
// =========== S T O P - S T O P - S T O P - S T O P - S T O P - S T O P ===========
|
|
14495
|
-
// =================================================================================================
|
|
14496
|
-
// =================================================================================================
|
|
14497
|
-
//
|
|
14498
|
-
// DO NOT EDIT THIS LIST OF SECURITY SENSITIVE PROPERTIES WITHOUT A SECURITY REVIEW!
|
|
14499
|
-
// Reach out to mprobst for details.
|
|
14500
|
-
//
|
|
14501
|
-
// =================================================================================================
|
|
14502
|
-
/** Map from tagName|propertyName to SecurityContext. Properties applying to all tags use '*'. */
|
|
14503
|
-
let _SECURITY_SCHEMA;
|
|
14504
|
-
function SECURITY_SCHEMA() {
|
|
14505
|
-
if (!_SECURITY_SCHEMA) {
|
|
14506
|
-
_SECURITY_SCHEMA = {};
|
|
14507
|
-
// Case is insignificant below, all element and attribute names are lower-cased for lookup.
|
|
14508
|
-
registerContext(SecurityContext.HTML, [
|
|
14509
|
-
'iframe|srcdoc',
|
|
14510
|
-
'*|innerHTML',
|
|
14511
|
-
'*|outerHTML',
|
|
14512
|
-
]);
|
|
14513
|
-
registerContext(SecurityContext.STYLE, ['*|style']);
|
|
14514
|
-
// NB: no SCRIPT contexts here, they are never allowed due to the parser stripping them.
|
|
14515
|
-
registerContext(SecurityContext.URL, [
|
|
14516
|
-
'*|formAction', 'area|href', 'area|ping', 'audio|src', 'a|href',
|
|
14517
|
-
'a|ping', 'blockquote|cite', 'body|background', 'del|cite', 'form|action',
|
|
14518
|
-
'img|src', 'img|srcset', 'input|src', 'ins|cite', 'q|cite',
|
|
14519
|
-
'source|src', 'source|srcset', 'track|src', 'video|poster', 'video|src',
|
|
14520
|
-
]);
|
|
14521
|
-
registerContext(SecurityContext.RESOURCE_URL, [
|
|
14522
|
-
'applet|code',
|
|
14523
|
-
'applet|codebase',
|
|
14524
|
-
'base|href',
|
|
14525
|
-
'embed|src',
|
|
14526
|
-
'frame|src',
|
|
14527
|
-
'head|profile',
|
|
14528
|
-
'html|manifest',
|
|
14529
|
-
'iframe|src',
|
|
14530
|
-
'link|href',
|
|
14531
|
-
'media|src',
|
|
14532
|
-
'object|codebase',
|
|
14533
|
-
'object|data',
|
|
14534
|
-
'script|src',
|
|
14535
|
-
]);
|
|
14536
|
-
}
|
|
14537
|
-
return _SECURITY_SCHEMA;
|
|
14538
|
-
}
|
|
14539
|
-
function registerContext(ctx, specs) {
|
|
14540
|
-
for (const spec of specs)
|
|
14541
|
-
_SECURITY_SCHEMA[spec.toLowerCase()] = ctx;
|
|
14542
|
-
}
|
|
14543
|
-
|
|
14544
14564
|
/**
|
|
14545
14565
|
* @license
|
|
14546
14566
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -17542,9 +17562,19 @@ class TemplateDefinitionBuilder {
|
|
|
17542
17562
|
const params = [];
|
|
17543
17563
|
const [attrNamespace, attrName] = splitNsName(input.name);
|
|
17544
17564
|
const isAttributeBinding = inputType === 1 /* Attribute */;
|
|
17545
|
-
|
|
17546
|
-
if (sanitizationRef)
|
|
17565
|
+
let sanitizationRef = resolveSanitizationFn(input.securityContext, isAttributeBinding);
|
|
17566
|
+
if (!sanitizationRef) {
|
|
17567
|
+
// If there was no sanitization function found based on the security context
|
|
17568
|
+
// of an attribute/property - check whether this attribute/property is
|
|
17569
|
+
// one of the security-sensitive <iframe> attributes (and that the current
|
|
17570
|
+
// element is actually an <iframe>).
|
|
17571
|
+
if (isIframeElement(element.name) && isIframeSecuritySensitiveAttr(input.name)) {
|
|
17572
|
+
sanitizationRef = importExpr(Identifiers.validateIframeAttribute);
|
|
17573
|
+
}
|
|
17574
|
+
}
|
|
17575
|
+
if (sanitizationRef) {
|
|
17547
17576
|
params.push(sanitizationRef);
|
|
17577
|
+
}
|
|
17548
17578
|
if (attrNamespace) {
|
|
17549
17579
|
const namespaceLiteral = literal(attrNamespace);
|
|
17550
17580
|
if (sanitizationRef) {
|
|
@@ -18611,6 +18641,9 @@ function isSingleElementTemplate(children) {
|
|
|
18611
18641
|
function isTextNode(node) {
|
|
18612
18642
|
return node instanceof Text$3 || node instanceof BoundText || node instanceof Icu$1;
|
|
18613
18643
|
}
|
|
18644
|
+
function isIframeElement(tagName) {
|
|
18645
|
+
return tagName.toLowerCase() === 'iframe';
|
|
18646
|
+
}
|
|
18614
18647
|
function hasTextChildrenOnly(children) {
|
|
18615
18648
|
return children.every(isTextNode);
|
|
18616
18649
|
}
|
|
@@ -19078,6 +19111,20 @@ function createHostBindingsFunction(hostBindingsMetadata, typeSourceSpan, bindin
|
|
|
19078
19111
|
if (sanitizerFn) {
|
|
19079
19112
|
instructionParams.push(sanitizerFn);
|
|
19080
19113
|
}
|
|
19114
|
+
else {
|
|
19115
|
+
// If there was no sanitization function found based on the security context
|
|
19116
|
+
// of an attribute/property binding - check whether this attribute/property is
|
|
19117
|
+
// one of the security-sensitive <iframe> attributes.
|
|
19118
|
+
// Note: for host bindings defined on a directive, we do not try to find all
|
|
19119
|
+
// possible places where it can be matched, so we can not determine whether
|
|
19120
|
+
// the host element is an <iframe>. In this case, if an attribute/binding
|
|
19121
|
+
// name is in the `IFRAME_SECURITY_SENSITIVE_ATTRS` set - append a validation
|
|
19122
|
+
// function, which would be invoked at runtime and would have access to the
|
|
19123
|
+
// underlying DOM element, check if it's an <iframe> and if so - runs extra checks.
|
|
19124
|
+
if (isIframeSecuritySensitiveAttr(bindingName)) {
|
|
19125
|
+
instructionParams.push(importExpr(Identifiers.validateIframeAttribute));
|
|
19126
|
+
}
|
|
19127
|
+
}
|
|
19081
19128
|
updateVariables.push(...bindingExpr.stmts);
|
|
19082
19129
|
if (instruction === Identifiers.hostProperty) {
|
|
19083
19130
|
propertyBindings.push(instructionParams);
|
|
@@ -19744,7 +19791,7 @@ function publishFacade(global) {
|
|
|
19744
19791
|
* Use of this source code is governed by an MIT-style license that can be
|
|
19745
19792
|
* found in the LICENSE file at https://angular.io/license
|
|
19746
19793
|
*/
|
|
19747
|
-
const VERSION = new Version('13.3.
|
|
19794
|
+
const VERSION = new Version('13.3.12');
|
|
19748
19795
|
|
|
19749
19796
|
/**
|
|
19750
19797
|
* @license
|
|
@@ -21771,7 +21818,7 @@ const MINIMUM_PARTIAL_LINKER_VERSION$6 = '12.0.0';
|
|
|
21771
21818
|
function compileDeclareClassMetadata(metadata) {
|
|
21772
21819
|
const definitionMap = new DefinitionMap();
|
|
21773
21820
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$6));
|
|
21774
|
-
definitionMap.set('version', literal('13.3.
|
|
21821
|
+
definitionMap.set('version', literal('13.3.12'));
|
|
21775
21822
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
21776
21823
|
definitionMap.set('type', metadata.type);
|
|
21777
21824
|
definitionMap.set('decorators', metadata.decorators);
|
|
@@ -21888,7 +21935,7 @@ function compileDeclareDirectiveFromMetadata(meta) {
|
|
|
21888
21935
|
function createDirectiveDefinitionMap(meta) {
|
|
21889
21936
|
const definitionMap = new DefinitionMap();
|
|
21890
21937
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$5));
|
|
21891
|
-
definitionMap.set('version', literal('13.3.
|
|
21938
|
+
definitionMap.set('version', literal('13.3.12'));
|
|
21892
21939
|
// e.g. `type: MyDirective`
|
|
21893
21940
|
definitionMap.set('type', meta.internalType);
|
|
21894
21941
|
// e.g. `selector: 'some-dir'`
|
|
@@ -22109,7 +22156,7 @@ const MINIMUM_PARTIAL_LINKER_VERSION$4 = '12.0.0';
|
|
|
22109
22156
|
function compileDeclareFactoryFunction(meta) {
|
|
22110
22157
|
const definitionMap = new DefinitionMap();
|
|
22111
22158
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$4));
|
|
22112
|
-
definitionMap.set('version', literal('13.3.
|
|
22159
|
+
definitionMap.set('version', literal('13.3.12'));
|
|
22113
22160
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
22114
22161
|
definitionMap.set('type', meta.internalType);
|
|
22115
22162
|
definitionMap.set('deps', compileDependencies(meta.deps));
|
|
@@ -22151,7 +22198,7 @@ function compileDeclareInjectableFromMetadata(meta) {
|
|
|
22151
22198
|
function createInjectableDefinitionMap(meta) {
|
|
22152
22199
|
const definitionMap = new DefinitionMap();
|
|
22153
22200
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$3));
|
|
22154
|
-
definitionMap.set('version', literal('13.3.
|
|
22201
|
+
definitionMap.set('version', literal('13.3.12'));
|
|
22155
22202
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
22156
22203
|
definitionMap.set('type', meta.internalType);
|
|
22157
22204
|
// Only generate providedIn property if it has a non-null value
|
|
@@ -22209,7 +22256,7 @@ function compileDeclareInjectorFromMetadata(meta) {
|
|
|
22209
22256
|
function createInjectorDefinitionMap(meta) {
|
|
22210
22257
|
const definitionMap = new DefinitionMap();
|
|
22211
22258
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$2));
|
|
22212
|
-
definitionMap.set('version', literal('13.3.
|
|
22259
|
+
definitionMap.set('version', literal('13.3.12'));
|
|
22213
22260
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
22214
22261
|
definitionMap.set('type', meta.internalType);
|
|
22215
22262
|
definitionMap.set('providers', meta.providers);
|
|
@@ -22246,7 +22293,7 @@ function compileDeclareNgModuleFromMetadata(meta) {
|
|
|
22246
22293
|
function createNgModuleDefinitionMap(meta) {
|
|
22247
22294
|
const definitionMap = new DefinitionMap();
|
|
22248
22295
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$1));
|
|
22249
|
-
definitionMap.set('version', literal('13.3.
|
|
22296
|
+
definitionMap.set('version', literal('13.3.12'));
|
|
22250
22297
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
22251
22298
|
definitionMap.set('type', meta.internalType);
|
|
22252
22299
|
// We only generate the keys in the metadata if the arrays contain values.
|
|
@@ -22304,7 +22351,7 @@ function compileDeclarePipeFromMetadata(meta) {
|
|
|
22304
22351
|
function createPipeDefinitionMap(meta) {
|
|
22305
22352
|
const definitionMap = new DefinitionMap();
|
|
22306
22353
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION));
|
|
22307
|
-
definitionMap.set('version', literal('13.3.
|
|
22354
|
+
definitionMap.set('version', literal('13.3.12'));
|
|
22308
22355
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
22309
22356
|
// e.g. `type: MyPipe`
|
|
22310
22357
|
definitionMap.set('type', meta.internalType);
|