@angular/compiler 15.0.0-rc.2 → 15.0.0-rc.4
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 +131 -84
- package/fesm2015/compiler.mjs.map +1 -1
- package/fesm2015/testing.mjs +1 -1
- package/fesm2020/compiler.mjs +131 -84
- package/fesm2020/compiler.mjs.map +1 -1
- package/fesm2020/testing.mjs +1 -1
- package/index.d.ts +2 -1
- package/package.json +2 -2
- package/testing/index.d.ts +1 -1
|
@@ -71,4 +71,23 @@ function registerContext(ctx, specs) {
|
|
|
71
71
|
for (const spec of specs)
|
|
72
72
|
_SECURITY_SCHEMA[spec.toLowerCase()] = ctx;
|
|
73
73
|
}
|
|
74
|
-
|
|
74
|
+
/**
|
|
75
|
+
* The set of security-sensitive attributes of an `<iframe>` that *must* be
|
|
76
|
+
* applied as a static attribute only. This ensures that all security-sensitive
|
|
77
|
+
* attributes are taken into account while creating an instance of an `<iframe>`
|
|
78
|
+
* at runtime.
|
|
79
|
+
*
|
|
80
|
+
* Note: avoid using this set directly, use the `isIframeSecuritySensitiveAttr` function
|
|
81
|
+
* in the code instead.
|
|
82
|
+
*/
|
|
83
|
+
export const IFRAME_SECURITY_SENSITIVE_ATTRS = new Set(['sandbox', 'allow', 'allowfullscreen', 'referrerpolicy', 'csp', 'fetchpriority']);
|
|
84
|
+
/**
|
|
85
|
+
* Checks whether a given attribute name might represent a security-sensitive
|
|
86
|
+
* attribute of an <iframe>.
|
|
87
|
+
*/
|
|
88
|
+
export function isIframeSecuritySensitiveAttr(attrName) {
|
|
89
|
+
// The `setAttribute` DOM API is case-insensitive, so we lowercase the value
|
|
90
|
+
// before checking it against a known security-sensitive attributes.
|
|
91
|
+
return IFRAME_SECURITY_SENSITIVE_ATTRS.has(attrName.toLowerCase());
|
|
92
|
+
}
|
|
93
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZG9tX3NlY3VyaXR5X3NjaGVtYS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL2NvbXBpbGVyL3NyYy9zY2hlbWEvZG9tX3NlY3VyaXR5X3NjaGVtYS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7O0dBTUc7QUFFSCxPQUFPLEVBQUMsZUFBZSxFQUFDLE1BQU0sU0FBUyxDQUFDO0FBRXhDLG9HQUFvRztBQUNwRyxvR0FBb0c7QUFDcEcsb0dBQW9HO0FBQ3BHLG9HQUFvRztBQUNwRyxvR0FBb0c7QUFDcEcsRUFBRTtBQUNGLDJGQUEyRjtBQUMzRixrRUFBa0U7QUFDbEUsRUFBRTtBQUNGLG9HQUFvRztBQUVwRyxpR0FBaUc7QUFDakcsSUFBSSxnQkFBaUQsQ0FBQztBQUV0RCxNQUFNLFVBQVUsZUFBZTtJQUM3QixJQUFJLENBQUMsZ0JBQWdCLEVBQUU7UUFDckIsZ0JBQWdCLEdBQUcsRUFBRSxDQUFDO1FBQ3RCLDJGQUEyRjtRQUUzRixlQUFlLENBQUMsZUFBZSxDQUFDLElBQUksRUFBRTtZQUNwQyxlQUFlO1lBQ2YsYUFBYTtZQUNiLGFBQWE7U0F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UFBRSxnQkFBZ0IsRUFBRSxLQUFLLEVBQUUsZUFBZSxDQUFDLENBQUMsQ0FBQztBQUUvRjs7O0dBR0c7QUFDSCxNQUFNLFVBQVUsNkJBQTZCLENBQUMsUUFBZ0I7SUFDNUQsNEVBQTRFO0lBQzVFLG9FQUFvRTtJQUNwRSxPQUFPLCtCQUErQixDQUFDLEdBQUcsQ0FBQyxRQUFRLENBQUMsV0FBVyxFQUFFLENBQUMsQ0FBQztBQUNyRSxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBAbGljZW5zZVxuICogQ29weXJpZ2h0IEdvb2dsZSBMTEMgQWxsIFJpZ2h0cyBSZXNlcnZlZC5cbiAqXG4gKiBVc2Ugb2YgdGhpcyBzb3VyY2UgY29kZSBpcyBnb3Zlcm5lZCBieSBhbiBNSVQtc3R5bGUgbGljZW5zZSB0aGF0IGNhbiBiZVxuICogZm91bmQgaW4gdGhlIExJQ0VOU0UgZmlsZSBhdCBodHRwczovL2FuZ3VsYXIuaW8vbGljZW5zZVxuICovXG5cbmltcG9ydCB7U2VjdXJpdHlDb250ZXh0fSBmcm9tICcuLi9jb3JlJztcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuLy8gPT09PT09PT09PT0gUyBUIE8gUCAgIC0gIFMgVCBPIFAgICAtICBTIFQgTyBQICAgLSAgUyBUIE8gUCAgIC0gIFMgVCBPIFAgICAtICBTIFQgTyBQICA9PT09PT09PT09PVxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuLy9cbi8vICAgICAgICBETyBOT1QgRURJVCBUSElTIExJU1QgT0YgU0VDVVJJVFkgU0VOU0lUSVZFIFBST1BFUlRJRVMgV0lUSE9VVCBBIFNFQ1VSSVRZIFJFVklFVyFcbi8vICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFJlYWNoIG91dCB0byBtcHJvYnN0IGZvciBkZXRhaWxzLlxuLy9cbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cblxuLyoqIE1hcCBmcm9tIHRhZ05hbWV8cHJvcGVydHlOYW1lIHRvIFNlY3VyaXR5Q29udGV4dC4gUHJvcGVydGllcyBhcHBseWluZyB0byBhbGwgdGFncyB1c2UgJyonLiAqL1xubGV0IF9TRUNVUklUWV9TQ0hFTUEhOiB7W2s6IHN0cmluZ106IFNlY3VyaXR5Q29udGV4dH07XG5cbmV4cG9ydCBmdW5jdGlvbiBTRUNVUklUWV9TQ0hFTUEoKToge1trOiBzdHJpbmddOiBTZWN1cml0eUNvbnRleHR9IHtcbiAgaWYgKCFfU0VDVVJJVFlfU0NIRU1BKSB7XG4gICAgX1NFQ1VSSVRZX1NDSEVNQSA9IHt9O1xuICAgIC8vIENhc2UgaXMgaW5zaWduaWZpY2FudCBiZWxvdywgYWxsIGVsZW1lbnQgYW5kIGF0dHJpYnV0ZSBuYW1lcyBhcmUgbG93ZXItY2FzZWQgZm9yIGxvb2t1cC5cblxuICAgIHJlZ2lzdGVyQ29udGV4dChTZWN1cml0eUNvbnRleHQuSFRNTCwgW1xuICAgICAgJ2lmcmFtZXxzcmNkb2MnLFxuICAgICAgJyp8aW5uZXJIVE1MJyxcbiA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ZmVycmVycG9saWN5JywgJ2NzcCcsICdmZXRjaHByaW9yaXR5J10pO1xuXG4vKipcbiAqIENoZWNrcyB3aGV0aGVyIGEgZ2l2ZW4gYXR0cmlidXRlIG5hbWUgbWlnaHQgcmVwcmVzZW50IGEgc2VjdXJpdHktc2Vuc2l0aXZlXG4gKiBhdHRyaWJ1dGUgb2YgYW4gPGlmcmFtZT4uXG4gKi9cbmV4cG9ydCBmdW5jdGlvbiBpc0lmcmFtZVNlY3VyaXR5U2Vuc2l0aXZlQXR0cihhdHRyTmFtZTogc3RyaW5nKTogYm9vbGVhbiB7XG4gIC8vIFRoZSBgc2V0QXR0cmlidXRlYCBET00gQVBJIGlzIGNhc2UtaW5zZW5zaXRpdmUsIHNvIHdlIGxvd2VyY2FzZSB0aGUgdmFsdWVcbiAgLy8gYmVmb3JlIGNoZWNraW5nIGl0IGFnYWluc3QgYSBrbm93biBzZWN1cml0eS1zZW5zaXRpdmUgYXR0cmlidXRlcy5cbiAgcmV0dXJuIElGUkFNRV9TRUNVUklUWV9TRU5TSVRJVkVfQVRUUlMuaGFzKGF0dHJOYW1lLnRvTG93ZXJDYXNlKCkpO1xufVxuIl19
|
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('15.0.0-rc.
|
|
14
|
+
export const VERSION = new Version('15.0.0-rc.4');
|
|
15
15
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmVyc2lvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL2NvbXBpbGVyL3NyYy92ZXJzaW9uLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7R0FNRztBQUVIOzs7O0dBSUc7QUFFSCxPQUFPLEVBQUMsT0FBTyxFQUFDLE1BQU0sUUFBUSxDQUFDO0FBRS9CLE1BQU0sQ0FBQyxNQUFNLE9BQU8sR0FBRyxJQUFJLE9BQU8sQ0FBQyxtQkFBbUIsQ0FBQyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBAbGljZW5zZVxuICogQ29weXJpZ2h0IEdvb2dsZSBMTEMgQWxsIFJpZ2h0cyBSZXNlcnZlZC5cbiAqXG4gKiBVc2Ugb2YgdGhpcyBzb3VyY2UgY29kZSBpcyBnb3Zlcm5lZCBieSBhbiBNSVQtc3R5bGUgbGljZW5zZSB0aGF0IGNhbiBiZVxuICogZm91bmQgaW4gdGhlIExJQ0VOU0UgZmlsZSBhdCBodHRwczovL2FuZ3VsYXIuaW8vbGljZW5zZVxuICovXG5cbi8qKlxuICogQG1vZHVsZVxuICogQGRlc2NyaXB0aW9uXG4gKiBFbnRyeSBwb2ludCBmb3IgYWxsIHB1YmxpYyBBUElzIG9mIHRoZSBjb21waWxlciBwYWNrYWdlLlxuICovXG5cbmltcG9ydCB7VmVyc2lvbn0gZnJvbSAnLi91dGlsJztcblxuZXhwb3J0IGNvbnN0IFZFUlNJT04gPSBuZXcgVmVyc2lvbignMC4wLjAtUExBQ0VIT0xERVInKTtcbiJdfQ==
|
package/fesm2015/compiler.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v15.0.0-rc.
|
|
2
|
+
* @license Angular v15.0.0-rc.4
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -2941,6 +2941,7 @@ Identifiers.sanitizeUrl = { name: 'ɵɵsanitizeUrl', moduleName: CORE };
|
|
|
2941
2941
|
Identifiers.sanitizeUrlOrResourceUrl = { name: 'ɵɵsanitizeUrlOrResourceUrl', moduleName: CORE };
|
|
2942
2942
|
Identifiers.trustConstantHtml = { name: 'ɵɵtrustConstantHtml', moduleName: CORE };
|
|
2943
2943
|
Identifiers.trustConstantResourceUrl = { name: 'ɵɵtrustConstantResourceUrl', moduleName: CORE };
|
|
2944
|
+
Identifiers.validateIframeAttribute = { name: 'ɵɵvalidateIframeAttribute', moduleName: CORE };
|
|
2944
2945
|
|
|
2945
2946
|
/**
|
|
2946
2947
|
* @license
|
|
@@ -7674,6 +7675,98 @@ class BuiltinFunctionCall extends Call {
|
|
|
7674
7675
|
}
|
|
7675
7676
|
}
|
|
7676
7677
|
|
|
7678
|
+
/**
|
|
7679
|
+
* @license
|
|
7680
|
+
* Copyright Google LLC All Rights Reserved.
|
|
7681
|
+
*
|
|
7682
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
7683
|
+
* found in the LICENSE file at https://angular.io/license
|
|
7684
|
+
*/
|
|
7685
|
+
// =================================================================================================
|
|
7686
|
+
// =================================================================================================
|
|
7687
|
+
// =========== S T O P - S T O P - S T O P - S T O P - S T O P - S T O P ===========
|
|
7688
|
+
// =================================================================================================
|
|
7689
|
+
// =================================================================================================
|
|
7690
|
+
//
|
|
7691
|
+
// DO NOT EDIT THIS LIST OF SECURITY SENSITIVE PROPERTIES WITHOUT A SECURITY REVIEW!
|
|
7692
|
+
// Reach out to mprobst for details.
|
|
7693
|
+
//
|
|
7694
|
+
// =================================================================================================
|
|
7695
|
+
/** Map from tagName|propertyName to SecurityContext. Properties applying to all tags use '*'. */
|
|
7696
|
+
let _SECURITY_SCHEMA;
|
|
7697
|
+
function SECURITY_SCHEMA() {
|
|
7698
|
+
if (!_SECURITY_SCHEMA) {
|
|
7699
|
+
_SECURITY_SCHEMA = {};
|
|
7700
|
+
// Case is insignificant below, all element and attribute names are lower-cased for lookup.
|
|
7701
|
+
registerContext(SecurityContext.HTML, [
|
|
7702
|
+
'iframe|srcdoc',
|
|
7703
|
+
'*|innerHTML',
|
|
7704
|
+
'*|outerHTML',
|
|
7705
|
+
]);
|
|
7706
|
+
registerContext(SecurityContext.STYLE, ['*|style']);
|
|
7707
|
+
// NB: no SCRIPT contexts here, they are never allowed due to the parser stripping them.
|
|
7708
|
+
registerContext(SecurityContext.URL, [
|
|
7709
|
+
'*|formAction',
|
|
7710
|
+
'area|href',
|
|
7711
|
+
'area|ping',
|
|
7712
|
+
'audio|src',
|
|
7713
|
+
'a|href',
|
|
7714
|
+
'a|ping',
|
|
7715
|
+
'blockquote|cite',
|
|
7716
|
+
'body|background',
|
|
7717
|
+
'del|cite',
|
|
7718
|
+
'form|action',
|
|
7719
|
+
'img|src',
|
|
7720
|
+
'input|src',
|
|
7721
|
+
'ins|cite',
|
|
7722
|
+
'q|cite',
|
|
7723
|
+
'source|src',
|
|
7724
|
+
'track|src',
|
|
7725
|
+
'video|poster',
|
|
7726
|
+
'video|src',
|
|
7727
|
+
]);
|
|
7728
|
+
registerContext(SecurityContext.RESOURCE_URL, [
|
|
7729
|
+
'applet|code',
|
|
7730
|
+
'applet|codebase',
|
|
7731
|
+
'base|href',
|
|
7732
|
+
'embed|src',
|
|
7733
|
+
'frame|src',
|
|
7734
|
+
'head|profile',
|
|
7735
|
+
'html|manifest',
|
|
7736
|
+
'iframe|src',
|
|
7737
|
+
'link|href',
|
|
7738
|
+
'media|src',
|
|
7739
|
+
'object|codebase',
|
|
7740
|
+
'object|data',
|
|
7741
|
+
'script|src',
|
|
7742
|
+
]);
|
|
7743
|
+
}
|
|
7744
|
+
return _SECURITY_SCHEMA;
|
|
7745
|
+
}
|
|
7746
|
+
function registerContext(ctx, specs) {
|
|
7747
|
+
for (const spec of specs)
|
|
7748
|
+
_SECURITY_SCHEMA[spec.toLowerCase()] = ctx;
|
|
7749
|
+
}
|
|
7750
|
+
/**
|
|
7751
|
+
* The set of security-sensitive attributes of an `<iframe>` that *must* be
|
|
7752
|
+
* applied as a static attribute only. This ensures that all security-sensitive
|
|
7753
|
+
* attributes are taken into account while creating an instance of an `<iframe>`
|
|
7754
|
+
* at runtime.
|
|
7755
|
+
*
|
|
7756
|
+
* Note: avoid using this set directly, use the `isIframeSecuritySensitiveAttr` function
|
|
7757
|
+
* in the code instead.
|
|
7758
|
+
*/
|
|
7759
|
+
const IFRAME_SECURITY_SENSITIVE_ATTRS = new Set(['sandbox', 'allow', 'allowfullscreen', 'referrerpolicy', 'csp', 'fetchpriority']);
|
|
7760
|
+
/**
|
|
7761
|
+
* Checks whether a given attribute name might represent a security-sensitive
|
|
7762
|
+
* attribute of an <iframe>.
|
|
7763
|
+
*/
|
|
7764
|
+
function isIframeSecuritySensitiveAttr(attrName) {
|
|
7765
|
+
// The `setAttribute` DOM API is case-insensitive, so we lowercase the value
|
|
7766
|
+
// before checking it against a known security-sensitive attributes.
|
|
7767
|
+
return IFRAME_SECURITY_SENSITIVE_ATTRS.has(attrName.toLowerCase());
|
|
7768
|
+
}
|
|
7769
|
+
|
|
7677
7770
|
/**
|
|
7678
7771
|
* @license
|
|
7679
7772
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -14765,79 +14858,6 @@ function mapLiteral(obj, quoted = false) {
|
|
|
14765
14858
|
})));
|
|
14766
14859
|
}
|
|
14767
14860
|
|
|
14768
|
-
/**
|
|
14769
|
-
* @license
|
|
14770
|
-
* Copyright Google LLC All Rights Reserved.
|
|
14771
|
-
*
|
|
14772
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
14773
|
-
* found in the LICENSE file at https://angular.io/license
|
|
14774
|
-
*/
|
|
14775
|
-
// =================================================================================================
|
|
14776
|
-
// =================================================================================================
|
|
14777
|
-
// =========== S T O P - S T O P - S T O P - S T O P - S T O P - S T O P ===========
|
|
14778
|
-
// =================================================================================================
|
|
14779
|
-
// =================================================================================================
|
|
14780
|
-
//
|
|
14781
|
-
// DO NOT EDIT THIS LIST OF SECURITY SENSITIVE PROPERTIES WITHOUT A SECURITY REVIEW!
|
|
14782
|
-
// Reach out to mprobst for details.
|
|
14783
|
-
//
|
|
14784
|
-
// =================================================================================================
|
|
14785
|
-
/** Map from tagName|propertyName to SecurityContext. Properties applying to all tags use '*'. */
|
|
14786
|
-
let _SECURITY_SCHEMA;
|
|
14787
|
-
function SECURITY_SCHEMA() {
|
|
14788
|
-
if (!_SECURITY_SCHEMA) {
|
|
14789
|
-
_SECURITY_SCHEMA = {};
|
|
14790
|
-
// Case is insignificant below, all element and attribute names are lower-cased for lookup.
|
|
14791
|
-
registerContext(SecurityContext.HTML, [
|
|
14792
|
-
'iframe|srcdoc',
|
|
14793
|
-
'*|innerHTML',
|
|
14794
|
-
'*|outerHTML',
|
|
14795
|
-
]);
|
|
14796
|
-
registerContext(SecurityContext.STYLE, ['*|style']);
|
|
14797
|
-
// NB: no SCRIPT contexts here, they are never allowed due to the parser stripping them.
|
|
14798
|
-
registerContext(SecurityContext.URL, [
|
|
14799
|
-
'*|formAction',
|
|
14800
|
-
'area|href',
|
|
14801
|
-
'area|ping',
|
|
14802
|
-
'audio|src',
|
|
14803
|
-
'a|href',
|
|
14804
|
-
'a|ping',
|
|
14805
|
-
'blockquote|cite',
|
|
14806
|
-
'body|background',
|
|
14807
|
-
'del|cite',
|
|
14808
|
-
'form|action',
|
|
14809
|
-
'img|src',
|
|
14810
|
-
'input|src',
|
|
14811
|
-
'ins|cite',
|
|
14812
|
-
'q|cite',
|
|
14813
|
-
'source|src',
|
|
14814
|
-
'track|src',
|
|
14815
|
-
'video|poster',
|
|
14816
|
-
'video|src',
|
|
14817
|
-
]);
|
|
14818
|
-
registerContext(SecurityContext.RESOURCE_URL, [
|
|
14819
|
-
'applet|code',
|
|
14820
|
-
'applet|codebase',
|
|
14821
|
-
'base|href',
|
|
14822
|
-
'embed|src',
|
|
14823
|
-
'frame|src',
|
|
14824
|
-
'head|profile',
|
|
14825
|
-
'html|manifest',
|
|
14826
|
-
'iframe|src',
|
|
14827
|
-
'link|href',
|
|
14828
|
-
'media|src',
|
|
14829
|
-
'object|codebase',
|
|
14830
|
-
'object|data',
|
|
14831
|
-
'script|src',
|
|
14832
|
-
]);
|
|
14833
|
-
}
|
|
14834
|
-
return _SECURITY_SCHEMA;
|
|
14835
|
-
}
|
|
14836
|
-
function registerContext(ctx, specs) {
|
|
14837
|
-
for (const spec of specs)
|
|
14838
|
-
_SECURITY_SCHEMA[spec.toLowerCase()] = ctx;
|
|
14839
|
-
}
|
|
14840
|
-
|
|
14841
14861
|
/**
|
|
14842
14862
|
* @license
|
|
14843
14863
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -17907,9 +17927,19 @@ class TemplateDefinitionBuilder {
|
|
|
17907
17927
|
const params = [];
|
|
17908
17928
|
const [attrNamespace, attrName] = splitNsName(input.name);
|
|
17909
17929
|
const isAttributeBinding = inputType === 1 /* BindingType.Attribute */;
|
|
17910
|
-
|
|
17911
|
-
if (sanitizationRef)
|
|
17930
|
+
let sanitizationRef = resolveSanitizationFn(input.securityContext, isAttributeBinding);
|
|
17931
|
+
if (!sanitizationRef) {
|
|
17932
|
+
// If there was no sanitization function found based on the security context
|
|
17933
|
+
// of an attribute/property - check whether this attribute/property is
|
|
17934
|
+
// one of the security-sensitive <iframe> attributes (and that the current
|
|
17935
|
+
// element is actually an <iframe>).
|
|
17936
|
+
if (isIframeElement(element.name) && isIframeSecuritySensitiveAttr(input.name)) {
|
|
17937
|
+
sanitizationRef = importExpr(Identifiers.validateIframeAttribute);
|
|
17938
|
+
}
|
|
17939
|
+
}
|
|
17940
|
+
if (sanitizationRef) {
|
|
17912
17941
|
params.push(sanitizationRef);
|
|
17942
|
+
}
|
|
17913
17943
|
if (attrNamespace) {
|
|
17914
17944
|
const namespaceLiteral = literal(attrNamespace);
|
|
17915
17945
|
if (sanitizationRef) {
|
|
@@ -18975,6 +19005,9 @@ function isSingleElementTemplate(children) {
|
|
|
18975
19005
|
function isTextNode(node) {
|
|
18976
19006
|
return node instanceof Text$3 || node instanceof BoundText || node instanceof Icu$1;
|
|
18977
19007
|
}
|
|
19008
|
+
function isIframeElement(tagName) {
|
|
19009
|
+
return tagName.toLowerCase() === 'iframe';
|
|
19010
|
+
}
|
|
18978
19011
|
function hasTextChildrenOnly(children) {
|
|
18979
19012
|
return children.every(isTextNode);
|
|
18980
19013
|
}
|
|
@@ -19458,6 +19491,20 @@ function createHostBindingsFunction(hostBindingsMetadata, typeSourceSpan, bindin
|
|
|
19458
19491
|
if (sanitizerFn) {
|
|
19459
19492
|
instructionParams.push(sanitizerFn);
|
|
19460
19493
|
}
|
|
19494
|
+
else {
|
|
19495
|
+
// If there was no sanitization function found based on the security context
|
|
19496
|
+
// of an attribute/property binding - check whether this attribute/property is
|
|
19497
|
+
// one of the security-sensitive <iframe> attributes.
|
|
19498
|
+
// Note: for host bindings defined on a directive, we do not try to find all
|
|
19499
|
+
// possible places where it can be matched, so we can not determine whether
|
|
19500
|
+
// the host element is an <iframe>. In this case, if an attribute/binding
|
|
19501
|
+
// name is in the `IFRAME_SECURITY_SENSITIVE_ATTRS` set - append a validation
|
|
19502
|
+
// function, which would be invoked at runtime and would have access to the
|
|
19503
|
+
// underlying DOM element, check if it's an <iframe> and if so - runs extra checks.
|
|
19504
|
+
if (isIframeSecuritySensitiveAttr(bindingName)) {
|
|
19505
|
+
instructionParams.push(importExpr(Identifiers.validateIframeAttribute));
|
|
19506
|
+
}
|
|
19507
|
+
}
|
|
19461
19508
|
updateVariables.push(...bindingExpr.stmts);
|
|
19462
19509
|
if (instruction === Identifiers.hostProperty) {
|
|
19463
19510
|
propertyBindings.push(instructionParams);
|
|
@@ -20245,7 +20292,7 @@ function publishFacade(global) {
|
|
|
20245
20292
|
* Use of this source code is governed by an MIT-style license that can be
|
|
20246
20293
|
* found in the LICENSE file at https://angular.io/license
|
|
20247
20294
|
*/
|
|
20248
|
-
const VERSION = new Version('15.0.0-rc.
|
|
20295
|
+
const VERSION = new Version('15.0.0-rc.4');
|
|
20249
20296
|
|
|
20250
20297
|
/**
|
|
20251
20298
|
* @license
|
|
@@ -22271,7 +22318,7 @@ const MINIMUM_PARTIAL_LINKER_VERSION$6 = '12.0.0';
|
|
|
22271
22318
|
function compileDeclareClassMetadata(metadata) {
|
|
22272
22319
|
const definitionMap = new DefinitionMap();
|
|
22273
22320
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$6));
|
|
22274
|
-
definitionMap.set('version', literal('15.0.0-rc.
|
|
22321
|
+
definitionMap.set('version', literal('15.0.0-rc.4'));
|
|
22275
22322
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
22276
22323
|
definitionMap.set('type', metadata.type);
|
|
22277
22324
|
definitionMap.set('decorators', metadata.decorators);
|
|
@@ -22389,7 +22436,7 @@ function createDirectiveDefinitionMap(meta) {
|
|
|
22389
22436
|
var _a;
|
|
22390
22437
|
const definitionMap = new DefinitionMap();
|
|
22391
22438
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$5));
|
|
22392
|
-
definitionMap.set('version', literal('15.0.0-rc.
|
|
22439
|
+
definitionMap.set('version', literal('15.0.0-rc.4'));
|
|
22393
22440
|
// e.g. `type: MyDirective`
|
|
22394
22441
|
definitionMap.set('type', meta.internalType);
|
|
22395
22442
|
if (meta.isStandalone) {
|
|
@@ -22628,7 +22675,7 @@ const MINIMUM_PARTIAL_LINKER_VERSION$4 = '12.0.0';
|
|
|
22628
22675
|
function compileDeclareFactoryFunction(meta) {
|
|
22629
22676
|
const definitionMap = new DefinitionMap();
|
|
22630
22677
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$4));
|
|
22631
|
-
definitionMap.set('version', literal('15.0.0-rc.
|
|
22678
|
+
definitionMap.set('version', literal('15.0.0-rc.4'));
|
|
22632
22679
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
22633
22680
|
definitionMap.set('type', meta.internalType);
|
|
22634
22681
|
definitionMap.set('deps', compileDependencies(meta.deps));
|
|
@@ -22670,7 +22717,7 @@ function compileDeclareInjectableFromMetadata(meta) {
|
|
|
22670
22717
|
function createInjectableDefinitionMap(meta) {
|
|
22671
22718
|
const definitionMap = new DefinitionMap();
|
|
22672
22719
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$3));
|
|
22673
|
-
definitionMap.set('version', literal('15.0.0-rc.
|
|
22720
|
+
definitionMap.set('version', literal('15.0.0-rc.4'));
|
|
22674
22721
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
22675
22722
|
definitionMap.set('type', meta.internalType);
|
|
22676
22723
|
// Only generate providedIn property if it has a non-null value
|
|
@@ -22728,7 +22775,7 @@ function compileDeclareInjectorFromMetadata(meta) {
|
|
|
22728
22775
|
function createInjectorDefinitionMap(meta) {
|
|
22729
22776
|
const definitionMap = new DefinitionMap();
|
|
22730
22777
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$2));
|
|
22731
|
-
definitionMap.set('version', literal('15.0.0-rc.
|
|
22778
|
+
definitionMap.set('version', literal('15.0.0-rc.4'));
|
|
22732
22779
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
22733
22780
|
definitionMap.set('type', meta.internalType);
|
|
22734
22781
|
definitionMap.set('providers', meta.providers);
|
|
@@ -22765,7 +22812,7 @@ function compileDeclareNgModuleFromMetadata(meta) {
|
|
|
22765
22812
|
function createNgModuleDefinitionMap(meta) {
|
|
22766
22813
|
const definitionMap = new DefinitionMap();
|
|
22767
22814
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$1));
|
|
22768
|
-
definitionMap.set('version', literal('15.0.0-rc.
|
|
22815
|
+
definitionMap.set('version', literal('15.0.0-rc.4'));
|
|
22769
22816
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
22770
22817
|
definitionMap.set('type', meta.internalType);
|
|
22771
22818
|
// We only generate the keys in the metadata if the arrays contain values.
|
|
@@ -22823,7 +22870,7 @@ function compileDeclarePipeFromMetadata(meta) {
|
|
|
22823
22870
|
function createPipeDefinitionMap(meta) {
|
|
22824
22871
|
const definitionMap = new DefinitionMap();
|
|
22825
22872
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION));
|
|
22826
|
-
definitionMap.set('version', literal('15.0.0-rc.
|
|
22873
|
+
definitionMap.set('version', literal('15.0.0-rc.4'));
|
|
22827
22874
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
22828
22875
|
// e.g. `type: MyPipe`
|
|
22829
22876
|
definitionMap.set('type', meta.internalType);
|