@locker/cli 0.28.9 → 0.28.11
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 +146 -220
- package/package.json +5 -5
package/dist/index.cjs.js
CHANGED
package/dist/index.mjs.js
CHANGED
package/dist/lws-sandbox.js
CHANGED
|
@@ -1377,7 +1377,7 @@
|
|
|
1377
1377
|
// reads identically to what isGaterEnabledFeature stores (register and
|
|
1378
1378
|
// deregister also accept the short form via fullName above). Frozen so a
|
|
1379
1379
|
// consumer cannot mutate the shared array.
|
|
1380
|
-
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`, `${FEATURE_NAME_PREFIX$LWS}walkRangeProtoChainForMethods`]);
|
|
1380
|
+
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`, `${FEATURE_NAME_PREFIX$LWS}walkRangeProtoChainForMethods`, `${FEATURE_NAME_PREFIX$LWS}blockHtmlObjectWithTypeTextHtml`]);
|
|
1381
1381
|
function registerGaterEnabledFeatures$LWS(lockerGaterEnabledFeatures$LWS) {
|
|
1382
1382
|
if (ArrayIsArray$LWS$1(lockerGaterEnabledFeatures$LWS)) {
|
|
1383
1383
|
lockerGaterEnabledFeatures$LWS.forEach(feature$LWS => gaterEnabledFeatures$LWS.add(fullName$LWS(feature$LWS)));
|
|
@@ -1386,6 +1386,7 @@
|
|
|
1386
1386
|
function isGaterEnabledFeature$LWS(featureName$LWS) {
|
|
1387
1387
|
return gaterEnabledFeatures$LWS.has(fullName$LWS(featureName$LWS));
|
|
1388
1388
|
}
|
|
1389
|
+
const COUNT_DISPATCH_EVENT_DETAIL_REFERENCES_GATE$LWS = 'countDispatchEventDetailReferences';
|
|
1389
1390
|
const ENABLE_MAX_PERF_MODE_GATE$LWS = 'enableMaxPerfMode';
|
|
1390
1391
|
const ENABLE_SANDBOX_CREATED_INSTRUMENTATION_GATE$LWS = 'enableSandboxCreatedInstrumentation';
|
|
1391
1392
|
const ENABLE_SANDBOXED_SAMEORIGIN_IFRAME_GATE$LWS = 'enableSandboxedSameOriginIframe';
|
|
@@ -1547,7 +1548,7 @@
|
|
|
1547
1548
|
const PromiseResolve$LWS = PromiseCtor$LWS.resolve.bind(PromiseCtor$LWS);
|
|
1548
1549
|
const PromiseReject$LWS = PromiseCtor$LWS.reject.bind(PromiseCtor$LWS);
|
|
1549
1550
|
toSafeSet$LWS(new SetCtor$LWS$1());
|
|
1550
|
-
/*! version: 0.28.
|
|
1551
|
+
/*! version: 0.28.11 */
|
|
1551
1552
|
|
|
1552
1553
|
/*!
|
|
1553
1554
|
* Copyright (C) 2019 salesforce.com, inc.
|
|
@@ -2385,13 +2386,18 @@
|
|
|
2385
2386
|
const DOMTokenListProtoLengthGetter$LWS = ObjectLookupOwnGetter$LWS$1(DOMTokenListProto$LWS, 'length');
|
|
2386
2387
|
const DOMTokenListProtoValueGetter$LWS = ObjectLookupOwnGetter$LWS$1(DOMTokenListProto$LWS, 'value');
|
|
2387
2388
|
const DOMTokenListProtoValueSetter$LWS = ObjectLookupOwnSetter$LWS(DOMTokenListProto$LWS, 'value');
|
|
2389
|
+
const CustomEventCtor$LWS = CustomEvent;
|
|
2388
2390
|
const EventCtor$LWS = Event;
|
|
2391
|
+
const {
|
|
2392
|
+
prototype: CustomEventProto$LWS
|
|
2393
|
+
} = CustomEventCtor$LWS;
|
|
2389
2394
|
const {
|
|
2390
2395
|
prototype: EventProto$LWS
|
|
2391
2396
|
} = EventCtor$LWS;
|
|
2392
2397
|
const {
|
|
2393
2398
|
stopPropagation: EventProtoStopPropagation$LWS
|
|
2394
2399
|
} = EventProto$LWS;
|
|
2400
|
+
const CustomEventProtoDetailGetter$LWS = ObjectLookupOwnGetter$LWS$1(CustomEventProto$LWS, 'detail');
|
|
2395
2401
|
const EventProtoCurrentTargetGetter$LWS = ObjectLookupOwnGetter$LWS$1(EventProto$LWS, 'currentTarget');
|
|
2396
2402
|
const EventProtoTypeGetter$LWS = ObjectLookupOwnGetter$LWS$1(EventProto$LWS, 'type');
|
|
2397
2403
|
const {
|
|
@@ -2663,7 +2669,7 @@
|
|
|
2663
2669
|
const XhrProtoResponseTextGetter$LWS = ObjectLookupOwnGetter$LWS$1(XhrProto$LWS, 'responseText');
|
|
2664
2670
|
const XhrProtoStatusGetter$LWS = ObjectLookupOwnGetter$LWS$1(XhrProto$LWS, 'status');
|
|
2665
2671
|
ObjectLookupOwnSetter$LWS(XhrProto$LWS, 'withCredentials');
|
|
2666
|
-
/*! version: 0.28.
|
|
2672
|
+
/*! version: 0.28.11 */
|
|
2667
2673
|
|
|
2668
2674
|
/*!
|
|
2669
2675
|
* Copyright (C) 2019 salesforce.com, inc.
|
|
@@ -2831,7 +2837,7 @@
|
|
|
2831
2837
|
}
|
|
2832
2838
|
return sanitized$LWS;
|
|
2833
2839
|
}
|
|
2834
|
-
/*! version: 0.28.
|
|
2840
|
+
/*! version: 0.28.11 */
|
|
2835
2841
|
|
|
2836
2842
|
/*!
|
|
2837
2843
|
* Copyright (C) 2023 salesforce.com, inc.
|
|
@@ -2907,7 +2913,7 @@
|
|
|
2907
2913
|
// swallow
|
|
2908
2914
|
}
|
|
2909
2915
|
const trusted = createPolicy('trusted', policyOptions);
|
|
2910
|
-
/*! version: 0.28.
|
|
2916
|
+
/*! version: 0.28.11 */
|
|
2911
2917
|
|
|
2912
2918
|
/*!
|
|
2913
2919
|
* Copyright (C) 2019 salesforce.com, inc.
|
|
@@ -3216,7 +3222,7 @@
|
|
|
3216
3222
|
}
|
|
3217
3223
|
return getSanitizerForConfig$LWS(sandboxKey$LWS, 'STRING_BLOB_HTML');
|
|
3218
3224
|
}
|
|
3219
|
-
/*! version: 0.28.
|
|
3225
|
+
/*! version: 0.28.11 */
|
|
3220
3226
|
|
|
3221
3227
|
/*!
|
|
3222
3228
|
* Copyright (C) 2023 salesforce.com, inc.
|
|
@@ -3425,7 +3431,7 @@
|
|
|
3425
3431
|
ReflectApply$LWS$1(ElementProtoSetAttributeNS$LWS, targetElement$LWS, [attributeNamespaceURI$LWS, attributeName$LWS, src$LWS]);
|
|
3426
3432
|
};
|
|
3427
3433
|
}
|
|
3428
|
-
/*! version: 0.28.
|
|
3434
|
+
/*! version: 0.28.11 */
|
|
3429
3435
|
|
|
3430
3436
|
/*!
|
|
3431
3437
|
* Copyright (C) 2019 salesforce.com, inc.
|
|
@@ -7030,11 +7036,68 @@
|
|
|
7030
7036
|
return [originalAddEventListener$LWS, addEventListener$LWS];
|
|
7031
7037
|
};
|
|
7032
7038
|
}
|
|
7033
|
-
|
|
7039
|
+
const DISPATCH_DETAIL_REFERENCE_METRIC$LWS = 'lws.dispatchEvent.detailReference';
|
|
7040
|
+
const DISPATCH_TOTAL_METRIC$LWS = 'lws.dispatchEvent.total';
|
|
7034
7041
|
// @W-18977628 — Reserved event types that sandboxed code must never dispatch.
|
|
7035
7042
|
// These are internal Aura framework events whose listeners run outside the
|
|
7036
7043
|
// sandbox and pass privileged unsandboxed references to the caller.
|
|
7037
7044
|
const BLOCKED_DISPATCH_EVENT_TYPES$LWS = toSafeSet$LWS(new SetCtor$LWS$1(['aurainteropfindowner']));
|
|
7045
|
+
// Realm-generic structural check for a genuine `Element` instance: recognizes
|
|
7046
|
+
// an `Element` minted from ANY realm (e.g. a same-origin iframe's document),
|
|
7047
|
+
// unlike `instanceof Element`, which only matches instances from the realm
|
|
7048
|
+
// that captured the `Element` constructor. A real `Element`, from any realm,
|
|
7049
|
+
// carries the internal slot backing `ElementProtoTagNameGetter` and the call
|
|
7050
|
+
// succeeds; anything else (including a same-realm impostor with a forged
|
|
7051
|
+
// prototype chain) throws a TypeError ("Illegal invocation").
|
|
7052
|
+
// Inlined here (rather than imported as `isElement` from `@locker/shared-dom`)
|
|
7053
|
+
// because this patch train's `shared-dom` predates that helper's introduction.
|
|
7054
|
+
function isDomElement$LWS(value$LWS) {
|
|
7055
|
+
if (value$LWS === null || typeof value$LWS !== 'object' && typeof value$LWS !== 'function') {
|
|
7056
|
+
return false;
|
|
7057
|
+
}
|
|
7058
|
+
try {
|
|
7059
|
+
ReflectApply$LWS$1(ElementProtoTagNameGetter$LWS, value$LWS, []);
|
|
7060
|
+
return true;
|
|
7061
|
+
} catch (_unused2$LWS) {
|
|
7062
|
+
return false;
|
|
7063
|
+
}
|
|
7064
|
+
}
|
|
7065
|
+
function isDomElementOrFunction$LWS(value$LWS) {
|
|
7066
|
+
return typeof value$LWS === 'function' || isDomElement$LWS(value$LWS);
|
|
7067
|
+
}
|
|
7068
|
+
function detailContainsReference$LWS(detail$LWS) {
|
|
7069
|
+
if (isDomElementOrFunction$LWS(detail$LWS)) {
|
|
7070
|
+
return true;
|
|
7071
|
+
}
|
|
7072
|
+
if (isObject$LWS$1(detail$LWS)) {
|
|
7073
|
+
const keys$LWS = ObjectKeys$LWS$1(detail$LWS);
|
|
7074
|
+
for (let i$LWS = 0, {
|
|
7075
|
+
length: length$LWS
|
|
7076
|
+
} = keys$LWS; i$LWS < length$LWS; i$LWS += 1) {
|
|
7077
|
+
if (isDomElementOrFunction$LWS(detail$LWS[keys$LWS[i$LWS]])) {
|
|
7078
|
+
return true;
|
|
7079
|
+
}
|
|
7080
|
+
}
|
|
7081
|
+
}
|
|
7082
|
+
return false;
|
|
7083
|
+
}
|
|
7084
|
+
function recordDispatchEventMetrics$LWS(instrumentation$LWS, event$LWS) {
|
|
7085
|
+
if (typeof (instrumentation$LWS == null ? void 0 : instrumentation$LWS.incrementCounter) !== 'function') {
|
|
7086
|
+
return;
|
|
7087
|
+
}
|
|
7088
|
+
// Denominator: every gated dispatch, so detailReference can be read as a rate.
|
|
7089
|
+
instrumentation$LWS.incrementCounter(DISPATCH_TOTAL_METRIC$LWS, 1, false);
|
|
7090
|
+
let hasReference$LWS = false;
|
|
7091
|
+
try {
|
|
7092
|
+
// The detail getter throws on a non-CustomEvent event; hostile detail can too.
|
|
7093
|
+
hasReference$LWS = detailContainsReference$LWS(ReflectApply$LWS$1(CustomEventProtoDetailGetter$LWS, event$LWS, []));
|
|
7094
|
+
} catch (_unused3$LWS) {
|
|
7095
|
+
return;
|
|
7096
|
+
}
|
|
7097
|
+
if (hasReference$LWS) {
|
|
7098
|
+
instrumentation$LWS.incrementCounter(DISPATCH_DETAIL_REFERENCE_METRIC$LWS, 1, false);
|
|
7099
|
+
}
|
|
7100
|
+
}
|
|
7038
7101
|
function initDistortionEventTargetDispatchEvent$LWS({
|
|
7039
7102
|
globalObject: {
|
|
7040
7103
|
EventTarget: {
|
|
@@ -7044,7 +7107,12 @@
|
|
|
7044
7107
|
}
|
|
7045
7108
|
}
|
|
7046
7109
|
}) {
|
|
7047
|
-
|
|
7110
|
+
// Read `instrumentation` from the inner factory's record, not this
|
|
7111
|
+
// initializer's: the initializer result is memoized per document and shared
|
|
7112
|
+
// across sandboxes, so capturing it here would freeze to the first sandbox.
|
|
7113
|
+
return function distortionEventTargetDispatchEvent$LWS({
|
|
7114
|
+
instrumentation: instrumentation$LWS
|
|
7115
|
+
}) {
|
|
7048
7116
|
function dispatchEvent$LWS(...args$LWS) {
|
|
7049
7117
|
const {
|
|
7050
7118
|
length: length$LWS
|
|
@@ -7058,6 +7126,9 @@
|
|
|
7058
7126
|
throw new LockerSecurityError$LWS(`Cannot dispatch '${eventType$LWS}' event.`);
|
|
7059
7127
|
}
|
|
7060
7128
|
}
|
|
7129
|
+
if (length$LWS > 0 && isGaterEnabledFeature$LWS(COUNT_DISPATCH_EVENT_DETAIL_REFERENCES_GATE$LWS)) {
|
|
7130
|
+
recordDispatchEventMetrics$LWS(instrumentation$LWS, args$LWS[0]);
|
|
7131
|
+
}
|
|
7061
7132
|
return ReflectApply$LWS$1(originalDispatchEvent$LWS, this, args$LWS);
|
|
7062
7133
|
}
|
|
7063
7134
|
return [originalDispatchEvent$LWS, dispatchEvent$LWS];
|
|
@@ -7088,6 +7159,14 @@
|
|
|
7088
7159
|
// changesSince.264: when the gate is off, no entry is installed and the
|
|
7089
7160
|
// primitive keeps its native behavior. One check here covers all five
|
|
7090
7161
|
// invocation-primitive distortions.
|
|
7162
|
+
//
|
|
7163
|
+
// CALLERS MUST capture their native primitive AFTER this returns truthy, inside
|
|
7164
|
+
// the distortion factory — never in the outer initializer's parameter
|
|
7165
|
+
// destructure. The initializer runs for every record built, including a
|
|
7166
|
+
// transitional secondary-window realm (e.g. a still-materializing
|
|
7167
|
+
// window.open()'d same-origin window) whose intrinsics are momentarily
|
|
7168
|
+
// undefined; an eager outer read dereferences them before this gate can bail
|
|
7169
|
+
// and throws (W-24222894).
|
|
7091
7170
|
function getDistortableFrameElement$LWS(globalObject$LWS) {
|
|
7092
7171
|
if (!isGaterEnabledFeature$LWS('changesSince.264')) {
|
|
7093
7172
|
return undefined;
|
|
@@ -7095,7 +7174,7 @@
|
|
|
7095
7174
|
let frameElement$LWS;
|
|
7096
7175
|
try {
|
|
7097
7176
|
frameElement$LWS = ReflectApply$LWS$1(WindowFrameElementGetter$LWS, globalObject$LWS, []);
|
|
7098
|
-
} catch (
|
|
7177
|
+
} catch (_unused4$LWS) {
|
|
7099
7178
|
// Cross-origin / non-window realm: not our target.
|
|
7100
7179
|
return undefined;
|
|
7101
7180
|
}
|
|
@@ -7125,15 +7204,7 @@
|
|
|
7125
7204
|
|
|
7126
7205
|
// W-22602807: distort an iframe contentWindow realm's Function.prototype.apply.
|
|
7127
7206
|
// See cross-realm-invocation.ts for the threat model.
|
|
7128
|
-
function initDistortionFunctionApply$LWS({
|
|
7129
|
-
globalObject: {
|
|
7130
|
-
Function: {
|
|
7131
|
-
prototype: {
|
|
7132
|
-
apply: originalApply$LWS
|
|
7133
|
-
}
|
|
7134
|
-
}
|
|
7135
|
-
}
|
|
7136
|
-
}) {
|
|
7207
|
+
function initDistortionFunctionApply$LWS() {
|
|
7137
7208
|
return function distortionFunctionApply$LWS({
|
|
7138
7209
|
globalObject: globalObject$LWS,
|
|
7139
7210
|
root: root$LWS
|
|
@@ -7141,6 +7212,14 @@
|
|
|
7141
7212
|
if (!getDistortableFrameElement$LWS(globalObject$LWS)) {
|
|
7142
7213
|
return undefined;
|
|
7143
7214
|
}
|
|
7215
|
+
// W-24222894: read the primitive AFTER the gate — never in the outer
|
|
7216
|
+
// initializer's parameter. The initializer runs for EVERY record built,
|
|
7217
|
+
// including a transitional secondary-window realm (e.g. a freshly
|
|
7218
|
+
// window.open()'d same-origin window still materializing) whose
|
|
7219
|
+
// Function.prototype is momentarily undefined; an eager outer read
|
|
7220
|
+
// dereferences it before this gate can bail and throws. See
|
|
7221
|
+
// cross-realm-invocation.ts.
|
|
7222
|
+
const originalApply$LWS = globalObject$LWS.Function.prototype.apply;
|
|
7144
7223
|
return [originalApply$LWS,
|
|
7145
7224
|
// `this` is the callee; (thisArg, argsArray) its binding and args.
|
|
7146
7225
|
// `apply` accepts a null/undefined argsArray, which ReflectApply
|
|
@@ -7157,15 +7236,7 @@
|
|
|
7157
7236
|
// bind defers invocation: it returns a bound function invoked later. We
|
|
7158
7237
|
// substitute the callee for its distorted counterpart FIRST, then bind that,
|
|
7159
7238
|
// so the returned bound function wraps the sandbox-distorted callee.
|
|
7160
|
-
function initDistortionFunctionBind$LWS({
|
|
7161
|
-
globalObject: {
|
|
7162
|
-
Function: {
|
|
7163
|
-
prototype: {
|
|
7164
|
-
bind: originalBind$LWS
|
|
7165
|
-
}
|
|
7166
|
-
}
|
|
7167
|
-
}
|
|
7168
|
-
}) {
|
|
7239
|
+
function initDistortionFunctionBind$LWS() {
|
|
7169
7240
|
return function distortionFunctionBind$LWS({
|
|
7170
7241
|
globalObject: globalObject$LWS,
|
|
7171
7242
|
root: root$LWS
|
|
@@ -7173,6 +7244,10 @@
|
|
|
7173
7244
|
if (!getDistortableFrameElement$LWS(globalObject$LWS)) {
|
|
7174
7245
|
return undefined;
|
|
7175
7246
|
}
|
|
7247
|
+
// W-24222894: read the primitive AFTER the gate. See apply-value.ts and
|
|
7248
|
+
// cross-realm-invocation.ts for why an eager outer-parameter read
|
|
7249
|
+
// crashes on a transitional secondary-window realm.
|
|
7250
|
+
const originalBind$LWS = globalObject$LWS.Function.prototype.bind;
|
|
7176
7251
|
return [originalBind$LWS,
|
|
7177
7252
|
// `this` is the callee; (thisArg, ...boundArgs) the binding and
|
|
7178
7253
|
// partially-applied args. Bind the substituted callee with the
|
|
@@ -7185,15 +7260,7 @@
|
|
|
7185
7260
|
|
|
7186
7261
|
// W-22602807: distort an iframe contentWindow realm's Function.prototype.call.
|
|
7187
7262
|
// See cross-realm-invocation.ts for the threat model.
|
|
7188
|
-
function initDistortionFunctionCall$LWS({
|
|
7189
|
-
globalObject: {
|
|
7190
|
-
Function: {
|
|
7191
|
-
prototype: {
|
|
7192
|
-
call: originalCall$LWS
|
|
7193
|
-
}
|
|
7194
|
-
}
|
|
7195
|
-
}
|
|
7196
|
-
}) {
|
|
7263
|
+
function initDistortionFunctionCall$LWS() {
|
|
7197
7264
|
return function distortionFunctionCall$LWS({
|
|
7198
7265
|
globalObject: globalObject$LWS,
|
|
7199
7266
|
root: root$LWS
|
|
@@ -7201,6 +7268,10 @@
|
|
|
7201
7268
|
if (!getDistortableFrameElement$LWS(globalObject$LWS)) {
|
|
7202
7269
|
return undefined;
|
|
7203
7270
|
}
|
|
7271
|
+
// W-24222894: read the primitive AFTER the gate. See apply-value.ts and
|
|
7272
|
+
// cross-realm-invocation.ts for why an eager outer-parameter read
|
|
7273
|
+
// crashes on a transitional secondary-window realm.
|
|
7274
|
+
const originalCall$LWS = globalObject$LWS.Function.prototype.call;
|
|
7204
7275
|
return [originalCall$LWS,
|
|
7205
7276
|
// `this` is the callee; (thisArg, ...args) its binding and arguments.
|
|
7206
7277
|
function call$LWS(thisArg$LWS, ...args$LWS) {
|
|
@@ -7862,7 +7933,7 @@
|
|
|
7862
7933
|
if (!isSameOriginURL$LWS(srcValue$LWS)) {
|
|
7863
7934
|
return;
|
|
7864
7935
|
}
|
|
7865
|
-
} catch (
|
|
7936
|
+
} catch (_unused5$LWS) {
|
|
7866
7937
|
/* empty */
|
|
7867
7938
|
}
|
|
7868
7939
|
if (!ReflectApply$LWS$1(DOMTokenListProtoContains$LWS, sandboxTokenList$LWS, [ALLOW_SCRIPTS_TOKEN$LWS])) {
|
|
@@ -8378,7 +8449,7 @@
|
|
|
8378
8449
|
}) {
|
|
8379
8450
|
const originalContentDocumentGetter$LWS = ObjectLookupOwnGetter$LWS$1(HTMLObjectElement$LWS.prototype, 'contentDocument');
|
|
8380
8451
|
const distortionEntry$LWS = [originalContentDocumentGetter$LWS, function contentDocument$LWS() {
|
|
8381
|
-
if (isGaterEnabledFeature$LWS('
|
|
8452
|
+
if (isGaterEnabledFeature$LWS('blockHtmlObjectWithTypeTextHtml')) {
|
|
8382
8453
|
// The <object> element has no sandbox attribute, so its embedded
|
|
8383
8454
|
// document runs with full privileges of the parent origin.
|
|
8384
8455
|
// Block access to prevent sandbox bypass.
|
|
@@ -8398,7 +8469,7 @@
|
|
|
8398
8469
|
}) {
|
|
8399
8470
|
const originalContentWindowGetter$LWS = ObjectLookupOwnGetter$LWS$1(HTMLObjectElement$LWS.prototype, 'contentWindow');
|
|
8400
8471
|
const distortionEntry$LWS = [originalContentWindowGetter$LWS, function contentWindow$LWS() {
|
|
8401
|
-
if (isGaterEnabledFeature$LWS('
|
|
8472
|
+
if (isGaterEnabledFeature$LWS('blockHtmlObjectWithTypeTextHtml')) {
|
|
8402
8473
|
// The <object> element has no sandbox attribute, so its embedded
|
|
8403
8474
|
// document runs with full privileges of the parent origin.
|
|
8404
8475
|
// Block access to prevent sandbox bypass.
|
|
@@ -8424,7 +8495,7 @@
|
|
|
8424
8495
|
const originalDataSetter$LWS = ObjectLookupOwnSetter$LWS(HTMLObjectElement$LWS.prototype, 'data');
|
|
8425
8496
|
const originalTypeGetter$LWS = ObjectLookupOwnGetter$LWS$1(HTMLObjectElement$LWS.prototype, 'type');
|
|
8426
8497
|
function data$LWS(value$LWS) {
|
|
8427
|
-
if (isGaterEnabledFeature$LWS('
|
|
8498
|
+
if (isGaterEnabledFeature$LWS('blockHtmlObjectWithTypeTextHtml')) {
|
|
8428
8499
|
const currentType$LWS = ReflectApply$LWS$1(originalTypeGetter$LWS, this, []);
|
|
8429
8500
|
const loweredType$LWS = ReflectApply$LWS$1(StringProtoToLowerCase$LWS, currentType$LWS, []);
|
|
8430
8501
|
// Strip MIME parameters before checking (e.g. "text/html;charset=utf-8" → "text/html").
|
|
@@ -8469,7 +8540,7 @@
|
|
|
8469
8540
|
}) {
|
|
8470
8541
|
const originalTypeSetter$LWS = ObjectLookupOwnSetter$LWS(HTMLObjectElement$LWS.prototype, 'type');
|
|
8471
8542
|
function type$LWS(value$LWS) {
|
|
8472
|
-
if (isGaterEnabledFeature$LWS('
|
|
8543
|
+
if (isGaterEnabledFeature$LWS('blockHtmlObjectWithTypeTextHtml')) {
|
|
8473
8544
|
const stringValue$LWS = `${value$LWS}`;
|
|
8474
8545
|
const lowered$LWS = ReflectApply$LWS$1(StringProtoToLowerCase$LWS, stringValue$LWS, []);
|
|
8475
8546
|
// Strip MIME parameters (e.g. "text/html;charset=utf-8" → "text/html").
|
|
@@ -10743,13 +10814,7 @@
|
|
|
10743
10814
|
// Unlike Function.prototype.apply, the callee is the FIRST ARGUMENT (not
|
|
10744
10815
|
// `this`) and the invocation never routes through Function.prototype.call, so
|
|
10745
10816
|
// it is an independent doorway that must be distorted separately.
|
|
10746
|
-
function initDistortionReflectApply$LWS({
|
|
10747
|
-
globalObject: {
|
|
10748
|
-
Reflect: {
|
|
10749
|
-
apply: originalReflectApply$LWS
|
|
10750
|
-
}
|
|
10751
|
-
}
|
|
10752
|
-
}) {
|
|
10817
|
+
function initDistortionReflectApply$LWS() {
|
|
10753
10818
|
return function distortionReflectApply$LWS({
|
|
10754
10819
|
globalObject: globalObject$LWS,
|
|
10755
10820
|
root: root$LWS
|
|
@@ -10757,6 +10822,11 @@
|
|
|
10757
10822
|
if (!getDistortableFrameElement$LWS(globalObject$LWS)) {
|
|
10758
10823
|
return undefined;
|
|
10759
10824
|
}
|
|
10825
|
+
// W-24222894: read the primitive AFTER the gate. See
|
|
10826
|
+
// ../Function/apply-value.ts and ../Function/cross-realm-invocation.ts
|
|
10827
|
+
// for why an eager outer-parameter read crashes on a transitional
|
|
10828
|
+
// secondary-window realm.
|
|
10829
|
+
const originalReflectApply$LWS = globalObject$LWS.Reflect.apply;
|
|
10760
10830
|
return [originalReflectApply$LWS, function apply$LWS(target$LWS, thisArg$LWS, argsArray$LWS) {
|
|
10761
10831
|
return ReflectApply$LWS$1(substituteDistortedCallee$LWS(root$LWS, target$LWS), thisArg$LWS, argsArray$LWS == null ? [] : argsArray$LWS);
|
|
10762
10832
|
}];
|
|
@@ -10770,13 +10840,7 @@
|
|
|
10770
10840
|
// invoked as a constructor. Substitute it for its distorted counterpart, then
|
|
10771
10841
|
// construct with the sandbox-realm Reflect.construct, preserving the optional
|
|
10772
10842
|
// newTarget argument.
|
|
10773
|
-
function initDistortionReflectConstruct$LWS({
|
|
10774
|
-
globalObject: {
|
|
10775
|
-
Reflect: {
|
|
10776
|
-
construct: originalReflectConstruct$LWS
|
|
10777
|
-
}
|
|
10778
|
-
}
|
|
10779
|
-
}) {
|
|
10843
|
+
function initDistortionReflectConstruct$LWS() {
|
|
10780
10844
|
return function distortionReflectConstruct$LWS({
|
|
10781
10845
|
globalObject: globalObject$LWS,
|
|
10782
10846
|
root: root$LWS
|
|
@@ -10784,6 +10848,11 @@
|
|
|
10784
10848
|
if (!getDistortableFrameElement$LWS(globalObject$LWS)) {
|
|
10785
10849
|
return undefined;
|
|
10786
10850
|
}
|
|
10851
|
+
// W-24222894: read the primitive AFTER the gate. See
|
|
10852
|
+
// ../Function/apply-value.ts and ../Function/cross-realm-invocation.ts
|
|
10853
|
+
// for why an eager outer-parameter read crashes on a transitional
|
|
10854
|
+
// secondary-window realm.
|
|
10855
|
+
const originalReflectConstruct$LWS = globalObject$LWS.Reflect.construct;
|
|
10787
10856
|
return [originalReflectConstruct$LWS, function construct$LWS(target$LWS, argsArray$LWS, newTarget$LWS) {
|
|
10788
10857
|
const substituted$LWS = substituteDistortedCallee$LWS(root$LWS, target$LWS);
|
|
10789
10858
|
if (arguments.length > 2) {
|
|
@@ -11440,7 +11509,7 @@
|
|
|
11440
11509
|
try {
|
|
11441
11510
|
originalStorageObject$LWS = globalObject$LWS[storageName$LWS];
|
|
11442
11511
|
// eslint-disable-next-line no-empty
|
|
11443
|
-
} catch (
|
|
11512
|
+
} catch (_unused6$LWS) {}
|
|
11444
11513
|
// istanbul ignore if: currently unreachable via tests
|
|
11445
11514
|
if (!isObject$LWS$1(originalStorageObject$LWS)) {
|
|
11446
11515
|
return noop$LWS$1;
|
|
@@ -11866,7 +11935,7 @@
|
|
|
11866
11935
|
try {
|
|
11867
11936
|
// istanbul ignore next: needs default platform behavior test
|
|
11868
11937
|
return ReflectApply$LWS$1(originalCreatePolicy$LWS, this, args$LWS);
|
|
11869
|
-
} catch (
|
|
11938
|
+
} catch (_unused7$LWS) {
|
|
11870
11939
|
// istanbul ignore next: this is tested, but currently cannot be tested in the coverage environment
|
|
11871
11940
|
consoleWarn$LWS(`${createTrustedTypesExceptionMessage$LWS(name$LWS)} Substituting with Lightning Web Security policy.`);
|
|
11872
11941
|
}
|
|
@@ -11939,7 +12008,7 @@
|
|
|
11939
12008
|
ReflectApply$LWS$1(XhrProtoOpen$LWS, xhr$LWS, ['GET', outURL$LWS, false]);
|
|
11940
12009
|
try {
|
|
11941
12010
|
ReflectApply$LWS$1(XhrProtoSend$LWS, xhr$LWS, []);
|
|
11942
|
-
} catch (
|
|
12011
|
+
} catch (_unused8$LWS) {
|
|
11943
12012
|
throw new LockerSecurityError$LWS(`Unable to verify ${toSafeTemplateStringValue$LWS(blobObject$LWS)} is secure.`);
|
|
11944
12013
|
}
|
|
11945
12014
|
const responseText$LWS = ReflectApply$LWS$1(XhrProtoResponseTextGetter$LWS, xhr$LWS, []);
|
|
@@ -12897,7 +12966,7 @@
|
|
|
12897
12966
|
const UIEventProtoBlockedProperties$LWS = ['rangeParent'];
|
|
12898
12967
|
const WindowBlockedProperties$LWS = ['find', 'requestFileSystem', 'webkitRequestFileSystem'];
|
|
12899
12968
|
const XSLTProcessorProtoBlockedProperties$LWS = ['transformToDocument', 'transformToFragment'];
|
|
12900
|
-
/*! version: 0.28.
|
|
12969
|
+
/*! version: 0.28.11 */
|
|
12901
12970
|
|
|
12902
12971
|
/*!
|
|
12903
12972
|
* Copyright (C) 2021 salesforce.com, inc.
|
|
@@ -12906,7 +12975,7 @@
|
|
|
12906
12975
|
function getPdpSchema$LWS() {
|
|
12907
12976
|
return pdpSchema$LWS;
|
|
12908
12977
|
}
|
|
12909
|
-
/*! version: 0.28.
|
|
12978
|
+
/*! version: 0.28.11 */
|
|
12910
12979
|
|
|
12911
12980
|
/*!
|
|
12912
12981
|
* Copyright (C) 2019 salesforce.com, inc.
|
|
@@ -15044,40 +15113,22 @@
|
|
|
15044
15113
|
const thisArgOrNewTarget$LWS = isApplyTrap$LWS ? thisArgOrArgs$LWS : argsOrNewTarget$LWS;
|
|
15045
15114
|
let combinedOffset$LWS = 2;
|
|
15046
15115
|
const combinedArgs$LWS = new ArrayCtor$LWS(length$LWS + combinedOffset$LWS);
|
|
15047
|
-
|
|
15048
|
-
// `[[Set]]` (`combinedArgs[i] = value`) to populate the combined arguments.
|
|
15049
|
-
// A plain array still inherits from `Array.prototype`, so a `[[Set]]` on a
|
|
15050
|
-
// numeric index would invoke an inherited accessor if sandboxed code has
|
|
15051
|
-
// installed one (e.g. `Object.defineProperty(Array.prototype, '2', { set })`).
|
|
15052
|
-
// Such a setter can observe and overwrite the pointers marshalled here —
|
|
15053
|
-
// including `combinedArgs[0]`, the foreign target pointer — redirecting the
|
|
15054
|
-
// call to a different foreign callable. Defining own data properties bypasses
|
|
15055
|
-
// the prototype chain entirely and is immune to prototype pollution.
|
|
15056
|
-
ReflectDefineProperty$LWS(combinedArgs$LWS, 0, {
|
|
15057
|
-
__proto__: null,
|
|
15058
|
-
value: foreignTargetPointer$LWS
|
|
15059
|
-
});
|
|
15116
|
+
combinedArgs$LWS[0] = foreignTargetPointer$LWS;
|
|
15060
15117
|
let pointerOrPrimitive$LWS;
|
|
15061
15118
|
try {
|
|
15062
|
-
|
|
15063
|
-
|
|
15064
|
-
|
|
15065
|
-
|
|
15066
|
-
|
|
15067
|
-
// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
|
|
15068
|
-
typeof thisArgOrNewTarget$LWS === 'undefined' ? undefined : thisArgOrNewTarget$LWS
|
|
15069
|
-
});
|
|
15119
|
+
combinedArgs$LWS[1] = typeof thisArgOrNewTarget$LWS === 'object' && thisArgOrNewTarget$LWS !== null || typeof thisArgOrNewTarget$LWS === 'function' ? getTransferablePointer$LWS(thisArgOrNewTarget$LWS) :
|
|
15120
|
+
// Intentionally ignoring `document.all`.
|
|
15121
|
+
// https://developer.mozilla.org/en-US/docs/Web/API/Document/all
|
|
15122
|
+
// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
|
|
15123
|
+
typeof thisArgOrNewTarget$LWS === 'undefined' ? undefined : thisArgOrNewTarget$LWS;
|
|
15070
15124
|
for (let i$LWS = 0; i$LWS < length$LWS; i$LWS += 1) {
|
|
15071
15125
|
const arg$LWS = args$LWS[i$LWS];
|
|
15072
15126
|
// Inlining `getTransferableValue()`.
|
|
15073
|
-
|
|
15074
|
-
|
|
15075
|
-
|
|
15076
|
-
|
|
15077
|
-
|
|
15078
|
-
// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
|
|
15079
|
-
typeof arg$LWS === 'undefined' ? undefined : arg$LWS
|
|
15080
|
-
});
|
|
15127
|
+
combinedArgs$LWS[combinedOffset$LWS++] = typeof arg$LWS === 'object' && arg$LWS !== null || typeof arg$LWS === 'function' ? getTransferablePointer$LWS(arg$LWS) :
|
|
15128
|
+
// Intentionally ignoring `document.all`.
|
|
15129
|
+
// https://developer.mozilla.org/en-US/docs/Web/API/Document/all
|
|
15130
|
+
// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
|
|
15131
|
+
typeof arg$LWS === 'undefined' ? undefined : arg$LWS;
|
|
15081
15132
|
}
|
|
15082
15133
|
pointerOrPrimitive$LWS = ReflectApply$LWS(foreignCallableApplyOrConstruct$LWS, undefined, combinedArgs$LWS);
|
|
15083
15134
|
} catch (error) {
|
|
@@ -15660,36 +15711,10 @@
|
|
|
15660
15711
|
// Replace pending traps with live traps that can work with the
|
|
15661
15712
|
// target without taking snapshots.
|
|
15662
15713
|
this.deleteProperty = BoundaryProxyHandler$LWS.passthruDeletePropertyTrap;
|
|
15714
|
+
this.defineProperty = BoundaryProxyHandler$LWS.passthruDefinePropertyTrap;
|
|
15663
15715
|
this.preventExtensions = BoundaryProxyHandler$LWS.passthruPreventExtensionsTrap;
|
|
15664
15716
|
this.set = BoundaryProxyHandler$LWS.passthruSetTrap;
|
|
15665
|
-
|
|
15666
|
-
// (the expando capability live targets actually need) but
|
|
15667
|
-
// accessor descriptors are scoped to the shadow target. The
|
|
15668
|
-
// passthru variant calls `foreignCallableDefineProperty` on the
|
|
15669
|
-
// RAW foreign target; for an accessor that plants a
|
|
15670
|
-
// sandbox-authored getter/setter directly onto a host-shared
|
|
15671
|
-
// object. Because the descriptor's functions are marshalled as
|
|
15672
|
-
// pointers back into the sandbox, any later access from the
|
|
15673
|
-
// primary realm (a confused deputy reading the planted key)
|
|
15674
|
-
// would execute sandbox code with the RAW object as `this` and
|
|
15675
|
-
// read raw-global-only state through it. Data expandos carry no
|
|
15676
|
-
// such callback, so they remain passthru; only accessors are
|
|
15677
|
-
// contained. See `liveAccessorGuardedDefinePropertyTrap`.
|
|
15678
|
-
this.defineProperty = BoundaryProxyHandler$LWS.liveAccessorGuardedDefinePropertyTrap;
|
|
15679
|
-
// `[[SetPrototypeOf]]` is the one live trap we do not
|
|
15680
|
-
// passthru. The passthru variant calls `ReflectSetPrototypeOf`
|
|
15681
|
-
// on the RAW foreign target, which lets sandbox code splice a
|
|
15682
|
-
// foreign prototype (e.g. the primary-realm global) onto a live
|
|
15683
|
-
// target and then read foreign globals through inherited
|
|
15684
|
-
// lookups: live reads resolve against the RAW prototype chain
|
|
15685
|
-
// (`hybridGetTrap` -> `lookupForeignDescriptor`), never the
|
|
15686
|
-
// shadow target. It also lets sandbox code wipe a host-shared
|
|
15687
|
-
// object's prototype to `null`. Scoping the proto change to the
|
|
15688
|
-
// shadow target makes both observably inert while leaving
|
|
15689
|
-
// `set`/`deleteProperty` passthru (the capabilities live targets
|
|
15690
|
-
// actually need) untouched. No legitimate live target re-parents
|
|
15691
|
-
// itself across the membrane.
|
|
15692
|
-
this.setPrototypeOf = BoundaryProxyHandler$LWS.staticSetPrototypeOfTrap;
|
|
15717
|
+
this.setPrototypeOf = BoundaryProxyHandler$LWS.passthruSetPrototypeOfTrap;
|
|
15693
15718
|
} : noop$LWS;
|
|
15694
15719
|
this.makeProxyStatic = IS_IN_SHADOW_REALM$LWS ? function () {
|
|
15695
15720
|
// Reset all traps except apply and construct for static proxies
|
|
@@ -16041,25 +16066,6 @@
|
|
|
16041
16066
|
if (IS_NOT_IN_SHADOW_REALM$LWS && (key$LWS === LOCKER_NEAR_MEMBRANE_SYMBOL$LWS || key$LWS === LOCKER_NEAR_MEMBRANE_SERIALIZED_VALUE_SYMBOL$LWS)) {
|
|
16042
16067
|
throw new TypeErrorCtor$LWS(ERR_ILLEGAL_PROPERTY_ACCESS$LWS);
|
|
16043
16068
|
}
|
|
16044
|
-
// `x.__proto__ = value` triggers the `Object.prototype.__proto__`
|
|
16045
|
-
// accessor, whose setter performs `[[SetPrototypeOf]]` on the
|
|
16046
|
-
// target. This is the live target's `set` trap, and its passthru
|
|
16047
|
-
// below would forward the write to the RAW foreign target,
|
|
16048
|
-
// running the raw realm's `__proto__` setter and reparenting the
|
|
16049
|
-
// raw object. That reintroduces the `setPrototypeOf` isolation
|
|
16050
|
-
// leak (W-23623814) through property-assignment syntax: a
|
|
16051
|
-
// subsequent inherited read would resolve foreign members
|
|
16052
|
-
// against the spliced prototype. Confine an own `__proto__`
|
|
16053
|
-
// write to the shadow target by delegating to `ReflectSet` on
|
|
16054
|
-
// it, exactly as static proxies do via `staticSetTrap`; the red
|
|
16055
|
-
// realm's own `__proto__` accessor then applies the correct
|
|
16056
|
-
// ordinary semantics (primitive no-op, Object/Null reparent)
|
|
16057
|
-
// scoped to the shadow target. A non-own write
|
|
16058
|
-
// (`proxy !== receiver`) targets the other receiver, not the
|
|
16059
|
-
// raw foreign target, so it is left to the passthru path.
|
|
16060
|
-
if (IS_IN_SHADOW_REALM$LWS && key$LWS === '__proto__' && proxy$LWS === receiver$LWS) {
|
|
16061
|
-
return ReflectSet$LWS(shadowTarget$LWS, key$LWS, value$LWS, shadowTarget$LWS);
|
|
16062
|
-
}
|
|
16063
16069
|
const isFastPath$LWS = proxy$LWS === receiver$LWS;
|
|
16064
16070
|
let result$LWS = false;
|
|
16065
16071
|
try {
|
|
@@ -16294,76 +16300,6 @@
|
|
|
16294
16300
|
}
|
|
16295
16301
|
return result$LWS;
|
|
16296
16302
|
} : alwaysFalse$LWS;
|
|
16297
|
-
// `[[DefineOwnProperty]]` trap for LIVE targets. Data descriptors are the
|
|
16298
|
-
// expando capability live targets rely on and stay passthru to the RAW
|
|
16299
|
-
// foreign target via `passthruDefinePropertyTrap`. Accessor descriptors
|
|
16300
|
-
// (a `get` and/or `set`), however, would install sandbox-authored
|
|
16301
|
-
// functions onto a host-shared object; a subsequent access from the
|
|
16302
|
-
// primary realm would run that sandbox code with the RAW target as
|
|
16303
|
-
// receiver and expose raw-global-only state. We contain accessors on the
|
|
16304
|
-
// inert shadow target instead. This mirrors the `staticSetPrototypeOfTrap`
|
|
16305
|
-
// contract: the operation is observably inert from every side. A live
|
|
16306
|
-
// `get` resolves against the RAW foreign target (`lookupForeignDescriptor`
|
|
16307
|
-
// reads the raw own descriptor and walks the RAW prototype chain; it only
|
|
16308
|
-
// ever writes the shadow target, never reads its own properties), so the
|
|
16309
|
-
// sandbox reads back `undefined` for a shadow-scoped accessor too. The
|
|
16310
|
-
// security-relevant guarantee is that no sandbox-authored callback ever
|
|
16311
|
-
// reaches the raw host-shared object.
|
|
16312
|
-
//
|
|
16313
|
-
// The shadow-scoped copy is always written with `configurable: true`,
|
|
16314
|
-
// regardless of what the sandbox asked for. A live proxy's `has`,
|
|
16315
|
-
// `ownKeys`, and `getOwnPropertyDescriptor` traps are NOT overridden by
|
|
16316
|
-
// `makeProxyLive()` (see `hybridHasTrap`, `passthruOwnKeysTrap`,
|
|
16317
|
-
// `passthruGetOwnPropertyDescriptorTrap`): they all resolve against the
|
|
16318
|
-
// RAW foreign target and never consult the shadow target's own
|
|
16319
|
-
// properties. `Object.defineProperty` defaults `configurable` to
|
|
16320
|
-
// `false`, so the common `{ get() {...} }` shape would otherwise leave
|
|
16321
|
-
// the shadow target — the proxy's actual `[[ProxyTarget]]` — holding a
|
|
16322
|
-
// NON-CONFIGURABLE own key that those raw-resolving traps can never
|
|
16323
|
-
// mirror. The engine's proxy invariants then throw on the very next
|
|
16324
|
-
// `has`/`ownKeys`/`getOwnPropertyDescriptor` (`in`, `Object.keys`,
|
|
16325
|
-
// spread, `JSON.stringify`, `Object.getOwnPropertyDescriptor`, ...)
|
|
16326
|
-
// because a non-configurable target key must be reported by those traps
|
|
16327
|
-
// and it never can be. Since the accessor is invisible through the
|
|
16328
|
-
// proxy either way (reads resolve against the raw target), forcing
|
|
16329
|
-
// `configurable: true` is not observable to the sandbox, and it keeps
|
|
16330
|
-
// every read-side invariant satisfiable. An explicit `configurable:
|
|
16331
|
-
// false` request cannot be honored while preserving that invisibility;
|
|
16332
|
-
// it now fails fast with a native TypeError raised by the engine's own
|
|
16333
|
-
// `defineProperty` trap-result invariant check (requested
|
|
16334
|
-
// non-configurable vs. an actually-configurable target descriptor) at
|
|
16335
|
-
// the `defineProperty` call site itself, rather than deferring the
|
|
16336
|
-
// detonation to a later, unrelated read.
|
|
16337
|
-
BoundaryProxyHandler$LWS.liveAccessorGuardedDefinePropertyTrap = IS_IN_SHADOW_REALM$LWS ? function (shadowTarget$LWS, key$LWS, unsafePartialDesc$LWS) {
|
|
16338
|
-
// A descriptor is an accessor iff it carries a `get` or `set`.
|
|
16339
|
-
// Read membership before detaching the prototype so a poisoned
|
|
16340
|
-
// `Object.prototype` getter cannot forge the answer.
|
|
16341
|
-
const isAccessorDescriptor$LWS = 'get' in unsafePartialDesc$LWS || 'set' in unsafePartialDesc$LWS;
|
|
16342
|
-
if (isAccessorDescriptor$LWS) {
|
|
16343
|
-
lastProxyTrapCalled$LWS = 4 /* ProxyHandlerTraps.DefineProperty */;
|
|
16344
|
-
// Build a fresh descriptor rather than writing the
|
|
16345
|
-
// sandbox's `unsafePartialDesc` object directly, and
|
|
16346
|
-
// force `configurable: true` on the shadow-scoped copy
|
|
16347
|
-
// (see the block comment above).
|
|
16348
|
-
const shadowDesc$LWS = {
|
|
16349
|
-
__proto__: null
|
|
16350
|
-
};
|
|
16351
|
-
if ('get' in unsafePartialDesc$LWS) {
|
|
16352
|
-
shadowDesc$LWS.get = unsafePartialDesc$LWS.get;
|
|
16353
|
-
}
|
|
16354
|
-
if ('set' in unsafePartialDesc$LWS) {
|
|
16355
|
-
shadowDesc$LWS.set = unsafePartialDesc$LWS.set;
|
|
16356
|
-
}
|
|
16357
|
-
if ('enumerable' in unsafePartialDesc$LWS) {
|
|
16358
|
-
shadowDesc$LWS.enumerable = unsafePartialDesc$LWS.enumerable;
|
|
16359
|
-
}
|
|
16360
|
-
shadowDesc$LWS.configurable = true;
|
|
16361
|
-
// Scope the accessor to the shadow target: observably
|
|
16362
|
-
// defined for the sandbox, never planted on the raw object.
|
|
16363
|
-
return ReflectDefineProperty$LWS(shadowTarget$LWS, key$LWS, shadowDesc$LWS);
|
|
16364
|
-
}
|
|
16365
|
-
return ReflectApply$LWS(BoundaryProxyHandler$LWS.passthruDefinePropertyTrap, this, [shadowTarget$LWS, key$LWS, unsafePartialDesc$LWS]);
|
|
16366
|
-
} : alwaysFalse$LWS;
|
|
16367
16303
|
BoundaryProxyHandler$LWS.passthruGetTrap = IS_NOT_IN_SHADOW_REALM$LWS ? function (_shadowTarget$LWS, key$LWS, receiver$LWS) {
|
|
16368
16304
|
// Only allow accessing handshake property values if the
|
|
16369
16305
|
// "has" trap has been triggered immediately BEFORE and
|
|
@@ -16664,17 +16600,7 @@
|
|
|
16664
16600
|
const pointerOrPrimitive$LWS = args$LWS[i$LWS];
|
|
16665
16601
|
if (typeof pointerOrPrimitive$LWS === 'function') {
|
|
16666
16602
|
pointerOrPrimitive$LWS();
|
|
16667
|
-
|
|
16668
|
-
// `args` is a rest-parameter array that still inherits from
|
|
16669
|
-
// `Array.prototype`, so a plain assignment to a numeric index would
|
|
16670
|
-
// invoke an inherited accessor installed by sandboxed code (e.g.
|
|
16671
|
-
// `Object.defineProperty(Array.prototype, '2', { set })`). Such a
|
|
16672
|
-
// setter could observe and overwrite the un-marshalled arguments
|
|
16673
|
-
// before they reach the target function. See W-23789302.
|
|
16674
|
-
ReflectDefineProperty$LWS(args$LWS, i$LWS, {
|
|
16675
|
-
__proto__: null,
|
|
16676
|
-
value: selectedTarget$LWS
|
|
16677
|
-
});
|
|
16603
|
+
args$LWS[i$LWS] = selectedTarget$LWS;
|
|
16678
16604
|
selectedTarget$LWS = undefined;
|
|
16679
16605
|
}
|
|
16680
16606
|
}
|
|
@@ -18441,7 +18367,7 @@
|
|
|
18441
18367
|
// tools from mistaking the regexp or the replacement string for an
|
|
18442
18368
|
// actual source mapping URL.
|
|
18443
18369
|
/\/\/# sandbox(?=MappingURL=.*?\s*$)/, '//# source']);
|
|
18444
|
-
sourceText$LWS = `\n//# LWS Version = "0.28.
|
|
18370
|
+
sourceText$LWS = `\n//# LWS Version = "0.28.11"\n${sourceText$LWS}`;
|
|
18445
18371
|
return sourceType$LWS === 1 /* SourceType.Module */ && indexOfPragma$LWS(sourceText$LWS, 'use strict') === -1 ?
|
|
18446
18372
|
// Append "'use strict'" to the extracted function body so it is
|
|
18447
18373
|
// evaluated in strict mode.
|
|
@@ -19121,7 +19047,7 @@
|
|
|
19121
19047
|
}
|
|
19122
19048
|
toSafeMap$LWS$1(new MapCtor$LWS$1());
|
|
19123
19049
|
toSafeSet$LWS(new SetCtor$LWS$1(['lightning/platformResourceLoader', 'lightning:platformResourceLoader', 'lightningmobileruntime/platformResourceLoader', 'lightningmobileruntime:platformResourceLoader']));
|
|
19124
|
-
/*! version: 0.28.
|
|
19050
|
+
/*! version: 0.28.11 */
|
|
19125
19051
|
|
|
19126
19052
|
// Expose evaluateInSandbox on the window global so the browser harness page
|
|
19127
19053
|
// (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.11",
|
|
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.11",
|
|
31
|
+
"@locker/sandbox": "0.28.11",
|
|
32
|
+
"@locker/shared": "0.28.11",
|
|
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": "2ef13ec4d86000a41a9926811eef2b766e29cfac"
|
|
47
47
|
}
|