@locker/cli 0.28.10 → 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 +132 -63
- 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.
|
|
@@ -18298,7 +18367,7 @@
|
|
|
18298
18367
|
// tools from mistaking the regexp or the replacement string for an
|
|
18299
18368
|
// actual source mapping URL.
|
|
18300
18369
|
/\/\/# sandbox(?=MappingURL=.*?\s*$)/, '//# source']);
|
|
18301
|
-
sourceText$LWS = `\n//# LWS Version = "0.28.
|
|
18370
|
+
sourceText$LWS = `\n//# LWS Version = "0.28.11"\n${sourceText$LWS}`;
|
|
18302
18371
|
return sourceType$LWS === 1 /* SourceType.Module */ && indexOfPragma$LWS(sourceText$LWS, 'use strict') === -1 ?
|
|
18303
18372
|
// Append "'use strict'" to the extracted function body so it is
|
|
18304
18373
|
// evaluated in strict mode.
|
|
@@ -18978,7 +19047,7 @@
|
|
|
18978
19047
|
}
|
|
18979
19048
|
toSafeMap$LWS$1(new MapCtor$LWS$1());
|
|
18980
19049
|
toSafeSet$LWS(new SetCtor$LWS$1(['lightning/platformResourceLoader', 'lightning:platformResourceLoader', 'lightningmobileruntime/platformResourceLoader', 'lightningmobileruntime:platformResourceLoader']));
|
|
18981
|
-
/*! version: 0.28.
|
|
19050
|
+
/*! version: 0.28.11 */
|
|
18982
19051
|
|
|
18983
19052
|
// Expose evaluateInSandbox on the window global so the browser harness page
|
|
18984
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
|
}
|