@locker/cli 0.28.6 → 0.28.8
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/dist/index.cjs.js +1 -1
- package/dist/index.mjs.js +1 -1
- package/dist/lws-sandbox.js +33 -17
- package/package.json +5 -5
package/dist/index.cjs.js
CHANGED
package/dist/index.mjs.js
CHANGED
package/dist/lws-sandbox.js
CHANGED
|
@@ -1369,7 +1369,7 @@
|
|
|
1369
1369
|
// reads identically to what isGaterEnabledFeature stores (register and
|
|
1370
1370
|
// deregister also accept the short form via fullName above). Frozen so a
|
|
1371
1371
|
// consumer cannot mutate the shared array.
|
|
1372
|
-
Object.freeze([`${FEATURE_NAME_PREFIX$LWS}changesSince.260`, `${FEATURE_NAME_PREFIX$LWS}changesSince.262`, `${FEATURE_NAME_PREFIX$LWS}changesSince.264`, `${FEATURE_NAME_PREFIX$LWS}htmlAnchorElementHrefValidation`, `${FEATURE_NAME_PREFIX$LWS}enableSandboxedSameOriginIframe`, `${FEATURE_NAME_PREFIX$LWS}xmlEntityAttackPrologScan`]);
|
|
1372
|
+
Object.freeze([`${FEATURE_NAME_PREFIX$LWS}changesSince.260`, `${FEATURE_NAME_PREFIX$LWS}changesSince.262`, `${FEATURE_NAME_PREFIX$LWS}changesSince.264`, `${FEATURE_NAME_PREFIX$LWS}htmlAnchorElementHrefValidation`, `${FEATURE_NAME_PREFIX$LWS}enableSandboxedSameOriginIframe`, `${FEATURE_NAME_PREFIX$LWS}iframeSrcSameOriginPreflightCheck`, `${FEATURE_NAME_PREFIX$LWS}xmlEntityAttackPrologScan`, `${FEATURE_NAME_PREFIX$LWS}blockWindowOpenSameOriginSameContext`]);
|
|
1373
1373
|
function registerGaterEnabledFeatures$LWS(lockerGaterEnabledFeatures$LWS) {
|
|
1374
1374
|
if (ArrayIsArray$LWS$1(lockerGaterEnabledFeatures$LWS)) {
|
|
1375
1375
|
lockerGaterEnabledFeatures$LWS.forEach(feature$LWS => gaterEnabledFeatures$LWS.add(fullName$LWS(feature$LWS)));
|
|
@@ -1539,7 +1539,7 @@
|
|
|
1539
1539
|
const PromiseResolve$LWS = PromiseCtor$LWS.resolve.bind(PromiseCtor$LWS);
|
|
1540
1540
|
const PromiseReject$LWS = PromiseCtor$LWS.reject.bind(PromiseCtor$LWS);
|
|
1541
1541
|
toSafeSet$LWS(new SetCtor$LWS$1());
|
|
1542
|
-
/*! version: 0.28.
|
|
1542
|
+
/*! version: 0.28.8 */
|
|
1543
1543
|
|
|
1544
1544
|
/*!
|
|
1545
1545
|
* Copyright (C) 2019 salesforce.com, inc.
|
|
@@ -2655,7 +2655,7 @@
|
|
|
2655
2655
|
const XhrProtoResponseTextGetter$LWS = ObjectLookupOwnGetter$LWS$1(XhrProto$LWS, 'responseText');
|
|
2656
2656
|
const XhrProtoStatusGetter$LWS = ObjectLookupOwnGetter$LWS$1(XhrProto$LWS, 'status');
|
|
2657
2657
|
ObjectLookupOwnSetter$LWS(XhrProto$LWS, 'withCredentials');
|
|
2658
|
-
/*! version: 0.28.
|
|
2658
|
+
/*! version: 0.28.8 */
|
|
2659
2659
|
|
|
2660
2660
|
/*!
|
|
2661
2661
|
* Copyright (C) 2019 salesforce.com, inc.
|
|
@@ -2823,7 +2823,7 @@
|
|
|
2823
2823
|
}
|
|
2824
2824
|
return sanitized$LWS;
|
|
2825
2825
|
}
|
|
2826
|
-
/*! version: 0.28.
|
|
2826
|
+
/*! version: 0.28.8 */
|
|
2827
2827
|
|
|
2828
2828
|
/*!
|
|
2829
2829
|
* Copyright (C) 2023 salesforce.com, inc.
|
|
@@ -2899,7 +2899,7 @@
|
|
|
2899
2899
|
// swallow
|
|
2900
2900
|
}
|
|
2901
2901
|
const trusted = createPolicy('trusted', policyOptions);
|
|
2902
|
-
/*! version: 0.28.
|
|
2902
|
+
/*! version: 0.28.8 */
|
|
2903
2903
|
|
|
2904
2904
|
/*!
|
|
2905
2905
|
* Copyright (C) 2019 salesforce.com, inc.
|
|
@@ -3208,7 +3208,7 @@
|
|
|
3208
3208
|
}
|
|
3209
3209
|
return getSanitizerForConfig$LWS(sandboxKey$LWS, 'STRING_BLOB_HTML');
|
|
3210
3210
|
}
|
|
3211
|
-
/*! version: 0.28.
|
|
3211
|
+
/*! version: 0.28.8 */
|
|
3212
3212
|
|
|
3213
3213
|
/*!
|
|
3214
3214
|
* Copyright (C) 2023 salesforce.com, inc.
|
|
@@ -3417,7 +3417,7 @@
|
|
|
3417
3417
|
ReflectApply$LWS$1(ElementProtoSetAttributeNS$LWS, targetElement$LWS, [attributeNamespaceURI$LWS, attributeName$LWS, src$LWS]);
|
|
3418
3418
|
};
|
|
3419
3419
|
}
|
|
3420
|
-
/*! version: 0.28.
|
|
3420
|
+
/*! version: 0.28.8 */
|
|
3421
3421
|
|
|
3422
3422
|
/*!
|
|
3423
3423
|
* Copyright (C) 2019 salesforce.com, inc.
|
|
@@ -7893,7 +7893,7 @@
|
|
|
7893
7893
|
// FOLLOWING `iframe.src = ...` (or setAttribute('src',...) etc.)
|
|
7894
7894
|
// even though we cannot synchronously propagate the original
|
|
7895
7895
|
// hostile-detection back to its triggering setter call.
|
|
7896
|
-
if (isGaterEnabledFeature$LWS('
|
|
7896
|
+
if (isGaterEnabledFeature$LWS('iframeSrcSameOriginPreflightCheck') && isPoisonedIframe$LWS(this)) {
|
|
7897
7897
|
throw new LockerSecurityError$LWS('HTMLIFrameElement is poisoned: a prior src assignment fetched a body containing an attack pattern. The iframe cannot be reused.');
|
|
7898
7898
|
}
|
|
7899
7899
|
const normalizedSrcValue$LWS = toSafeStringValue$LWS(value$LWS);
|
|
@@ -7944,7 +7944,7 @@
|
|
|
7944
7944
|
// resolves. Pending URL is recorded normally so read paths
|
|
7945
7945
|
// (iframe.src, getAttribute('src'), attributes['src'].value)
|
|
7946
7946
|
// surface what sandbox code wrote.
|
|
7947
|
-
if (isGaterEnabledFeature$LWS('
|
|
7947
|
+
if (isGaterEnabledFeature$LWS('iframeSrcSameOriginPreflightCheck') && urlString$LWS !== '' && urlString$LWS !== ABOUT_BLANK_TOKEN$LWS && isSameOriginURL$LWS(urlString$LWS)) {
|
|
7948
7948
|
// Cross-iframe rejection cache: if any prior pre-flight
|
|
7949
7949
|
// (on this iframe or any other) detected an attack
|
|
7950
7950
|
// pattern at this URL's pathname, refuse the assignment
|
|
@@ -9473,7 +9473,13 @@
|
|
|
9473
9473
|
}) {
|
|
9474
9474
|
const distortionEntry$LWS = [originalGetRootNode$LWS, function getRootNode$LWS(...args$LWS) {
|
|
9475
9475
|
const realRoot$LWS = ReflectApply$LWS$1(originalGetRootNode$LWS, this, args$LWS);
|
|
9476
|
-
|
|
9476
|
+
// Gated OFF by default (restrictCrossSandboxNodeTraversal, not in
|
|
9477
|
+
// LWS_DEFAULT_GATER_FEATURES). The cross-sandbox traversal restriction
|
|
9478
|
+
// returns the sandbox document for a foreign ShadowRoot, which breaks a
|
|
9479
|
+
// legitimate getRootNode() within a single app that spans multiple sandbox
|
|
9480
|
+
// keys (e.g. OmniStudio). Re-enable per-org via the gate once the ownership
|
|
9481
|
+
// model can represent multi-namespace apps.
|
|
9482
|
+
if (isGaterEnabledFeature$LWS('restrictCrossSandboxNodeTraversal') && realRoot$LWS instanceof ShadowRoot$LWS && !isShadowRootAccessibleInThisSandbox$LWS(key$LWS, realRoot$LWS)) {
|
|
9477
9483
|
return document$LWS;
|
|
9478
9484
|
}
|
|
9479
9485
|
return realRoot$LWS;
|
|
@@ -9562,7 +9568,12 @@
|
|
|
9562
9568
|
}) {
|
|
9563
9569
|
const distortionEntry$LWS = [originalParentElementGetter$LWS, function parentElement$LWS() {
|
|
9564
9570
|
const parent$LWS = ReflectApply$LWS$1(originalParentElementGetter$LWS, this, []);
|
|
9565
|
-
|
|
9571
|
+
// Gated OFF by default (restrictCrossSandboxNodeTraversal, not in
|
|
9572
|
+
// LWS_DEFAULT_GATER_FEATURES). The cross-sandbox traversal restriction
|
|
9573
|
+
// nulls a legitimate upward walk within a single app that spans multiple
|
|
9574
|
+
// sandbox keys (e.g. OmniStudio). Re-enable per-org via the gate once the
|
|
9575
|
+
// ownership model can represent multi-namespace apps.
|
|
9576
|
+
if (parent$LWS === null || !isGaterEnabledFeature$LWS('restrictCrossSandboxNodeTraversal')) {
|
|
9566
9577
|
return parent$LWS;
|
|
9567
9578
|
}
|
|
9568
9579
|
const parentRoot$LWS = ReflectApply$LWS$1(originalGetRootNode$LWS, parent$LWS, []);
|
|
@@ -9587,7 +9598,12 @@
|
|
|
9587
9598
|
}) {
|
|
9588
9599
|
const distortionEntry$LWS = [originalParentNodeGetter$LWS, function parentNode$LWS() {
|
|
9589
9600
|
const parent$LWS = ReflectApply$LWS$1(originalParentNodeGetter$LWS, this, []);
|
|
9590
|
-
|
|
9601
|
+
// Gated OFF by default (restrictCrossSandboxNodeTraversal, not in
|
|
9602
|
+
// LWS_DEFAULT_GATER_FEATURES). The cross-sandbox traversal restriction
|
|
9603
|
+
// nulls a legitimate upward walk within a single app that spans multiple
|
|
9604
|
+
// sandbox keys (e.g. OmniStudio). Re-enable per-org via the gate once the
|
|
9605
|
+
// ownership model can represent multi-namespace apps.
|
|
9606
|
+
if (parent$LWS === null || !isGaterEnabledFeature$LWS('restrictCrossSandboxNodeTraversal')) {
|
|
9591
9607
|
return parent$LWS;
|
|
9592
9608
|
}
|
|
9593
9609
|
const parentRoot$LWS = ReflectApply$LWS$1(originalGetRootNode$LWS, parent$LWS, []);
|
|
@@ -12284,7 +12300,7 @@
|
|
|
12284
12300
|
// Same-browsing-context targets (_self, _parent, _top) are excluded:
|
|
12285
12301
|
// they navigate the current context (no new unsandboxed page), and the
|
|
12286
12302
|
// existing URL validation (gate 262) already guards them.
|
|
12287
|
-
if (isGaterEnabledFeature$LWS('
|
|
12303
|
+
if (isGaterEnabledFeature$LWS('blockWindowOpenSameOriginSameContext') && !willOpenInSameBrowsingContext$LWS) {
|
|
12288
12304
|
if (isSameOriginURL$LWS(resourceUrl$LWS)) {
|
|
12289
12305
|
throw new LockerSecurityError$LWS('Cannot open same-origin URL in a new browsing context.');
|
|
12290
12306
|
}
|
|
@@ -12805,7 +12821,7 @@
|
|
|
12805
12821
|
const UIEventProtoBlockedProperties$LWS = ['rangeParent'];
|
|
12806
12822
|
const WindowBlockedProperties$LWS = ['find', 'requestFileSystem', 'webkitRequestFileSystem'];
|
|
12807
12823
|
const XSLTProcessorProtoBlockedProperties$LWS = ['transformToDocument', 'transformToFragment'];
|
|
12808
|
-
/*! version: 0.28.
|
|
12824
|
+
/*! version: 0.28.8 */
|
|
12809
12825
|
|
|
12810
12826
|
/*!
|
|
12811
12827
|
* Copyright (C) 2021 salesforce.com, inc.
|
|
@@ -12814,7 +12830,7 @@
|
|
|
12814
12830
|
function getPdpSchema$LWS() {
|
|
12815
12831
|
return pdpSchema$LWS;
|
|
12816
12832
|
}
|
|
12817
|
-
/*! version: 0.28.
|
|
12833
|
+
/*! version: 0.28.8 */
|
|
12818
12834
|
|
|
12819
12835
|
/*!
|
|
12820
12836
|
* Copyright (C) 2019 salesforce.com, inc.
|
|
@@ -18206,7 +18222,7 @@
|
|
|
18206
18222
|
// tools from mistaking the regexp or the replacement string for an
|
|
18207
18223
|
// actual source mapping URL.
|
|
18208
18224
|
/\/\/# sandbox(?=MappingURL=.*?\s*$)/, '//# source']);
|
|
18209
|
-
sourceText$LWS = `\n//# LWS Version = "0.28.
|
|
18225
|
+
sourceText$LWS = `\n//# LWS Version = "0.28.8"\n${sourceText$LWS}`;
|
|
18210
18226
|
return sourceType$LWS === 1 /* SourceType.Module */ && indexOfPragma$LWS(sourceText$LWS, 'use strict') === -1 ?
|
|
18211
18227
|
// Append "'use strict'" to the extracted function body so it is
|
|
18212
18228
|
// evaluated in strict mode.
|
|
@@ -18886,7 +18902,7 @@
|
|
|
18886
18902
|
}
|
|
18887
18903
|
toSafeMap$LWS$1(new MapCtor$LWS$1());
|
|
18888
18904
|
toSafeSet$LWS(new SetCtor$LWS$1(['lightning/platformResourceLoader', 'lightning:platformResourceLoader', 'lightningmobileruntime/platformResourceLoader', 'lightningmobileruntime:platformResourceLoader']));
|
|
18889
|
-
/*! version: 0.28.
|
|
18905
|
+
/*! version: 0.28.8 */
|
|
18890
18906
|
|
|
18891
18907
|
// Expose evaluateInSandbox on the window global so the browser harness page
|
|
18892
18908
|
// (eval.html / component.html) can invoke it against source delivered by the
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@locker/cli",
|
|
3
|
-
"version": "0.28.
|
|
3
|
+
"version": "0.28.8",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"author": "Salesforce UI Security Team",
|
|
6
6
|
"description": "Lightning Web Security CLI",
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@babel/parser": "7.28.0",
|
|
30
|
-
"@locker/rollup-plugin": "0.28.
|
|
31
|
-
"@locker/sandbox": "0.28.
|
|
32
|
-
"@locker/shared": "0.28.
|
|
30
|
+
"@locker/rollup-plugin": "0.28.8",
|
|
31
|
+
"@locker/sandbox": "0.28.8",
|
|
32
|
+
"@locker/shared": "0.28.8",
|
|
33
33
|
"@lwc/engine-dom": "8.21.1",
|
|
34
34
|
"@lwc/rollup-plugin": "8.21.1",
|
|
35
35
|
"@rollup/plugin-commonjs": "21.1.0",
|
|
@@ -43,5 +43,5 @@
|
|
|
43
43
|
"rollup-plugin-ts": "3.4.5",
|
|
44
44
|
"yargs": "17.7.2"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "59e9a7dd6e507da1b9728504e5ac10d170f131fc"
|
|
47
47
|
}
|