Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 81 additions & 0 deletions lib/locker/3rdparty/ses/whitelist.js
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,8 @@ module.exports = ses; // custom line to make it work in node env.
},
getPrototypeOf: t,
getOwnPropertyDescriptor: t,
getOwnPropertyDescriptors: t,
getOwnPropertySymbols: t,
getOwnPropertyNames: t,
create: t,
defineProperty: t,
Expand All @@ -309,6 +311,14 @@ module.exports = ses; // custom line to make it work in node env.
isFrozen: t,
isExtensible: t,
keys: t,
entries: t,
fromEntries: t,
isFrozen: t,
isSealed: t,
values: t,
hasOwn: t,
groupBy: t,
is: t,
},
NaN: t,
Infinity: t,
Expand Down Expand Up @@ -356,8 +366,27 @@ module.exports = ses; // custom line to make it work in node env.
reduce: t,
reduceRight: t,
length: t,
at: t,
entries: t,
with: t,
flatMap: t,
findIndex: t,
findLast: t,
fill: t,
includes: t,
toSpliced: t,
findLastIndex: t,
copyWithin: t,
flat: t,
find: t,
toReversed: t,
toSorted: t,
values: t,
keys: t,
},
isArray: t,
of: t,
from: t,
},
String: {
prototype: {
Expand Down Expand Up @@ -396,6 +425,21 @@ module.exports = ses; // custom line to make it work in node env.
toLocaleUpperCase: t,
trim: t,
length: '*',
startsWith: t,
endsWith: t,
at: t,
toWellFormed: t,
matchAll: t,
padEnd: t,
includes: t,
isWellFormed: t,
padStart: t,
trimStart: t,
repeat: t,
normalize: t,
replaceAll: t,
trimEnd: t,
codePointAt: t,
},
fromCharCode: t,
},
Expand All @@ -410,12 +454,19 @@ module.exports = ses; // custom line to make it work in node env.
toFixed: t,
toExponential: t,
toPrecision: t,
toLocaleString: t,
},
MAX_VALUE: t,
MIN_VALUE: t,
NaN: t,
NEGATIVE_INFINITY: t,
POSITIVE_INFINITY: t,
EPSILON: t,
isFinite: t,
parseInt: t,
isInteger: t,
MAX_SAFE_INTEGER: t,
MIN_SAFE_INTEGER: t
},
Math: {
E: t,
Expand All @@ -432,19 +483,36 @@ module.exports = ses; // custom line to make it work in node env.
asin: t,
atan: t,
atan2: t,
asinh: t,
acosh: t,
atanh: t,
ceil: t,
cos: t,
exp: t,
floor: t,
log: t,
log1p: t,
log2: t,
log10: t,
max: t,
min: t,
pow: t,
random: t, // questionable
round: t,
fround: t,
sin: t,
sinh: t,
cosh: t,
tanh: t,
sqrt: t,
tan: t,
expm1: t,
sign: t,
imul: t,
cbrt: t,
hypot: t,
trunc: t,
clz32: t,
},
Date: {
// no-arg Date constructor is questionable
Expand Down Expand Up @@ -504,6 +572,8 @@ module.exports = ses; // custom line to make it work in node env.
prototype: {
exec: t,
test: t,
unicodeSets: t,
dotAll: t,
source: 'maybeAccessor',
global: 'maybeAccessor',
ignoreCase: 'maybeAccessor',
Expand Down Expand Up @@ -563,6 +633,13 @@ module.exports = ses; // custom line to make it work in node env.
prototype: {
byteLength: 'maybeAccessor',
slice: t,
detached: t,
transfer: t,
resizable: t,
maxByteLength: t,
resize: t,
transferToFixedLength: t

},
},
Int8Array: TypedArrayWhitelist,
Expand Down Expand Up @@ -590,6 +667,8 @@ module.exports = ses; // custom line to make it work in node env.
getUint32: t,
getFloat32: t,
getFloat64: t,
getBigInt64: t,
getBigUint64: t,
setInt8: t,
setUint8: t,
setInt16: t,
Expand All @@ -598,6 +677,8 @@ module.exports = ses; // custom line to make it work in node env.
setUint32: t,
setFloat32: t,
setFloat64: t,
setBigInt64: t,
setBigUint64: t,
},
},
};
Expand Down