fix(ses): Do not crash under no-unsafe-eval Content Security Policy
MODIFY
packages/ses/src/tame-function-constructors.js
packages/ses/src/tame-function-constructors.js
@@ -5,6 +5,7 @@ import {
defineProperties,
getPrototypeOf,
setPrototypeOf,
+ freeze,
} from './commons.js';
// This module replaces the original `Function` constructor, and the original
@@ -49,7 +50,7 @@ export default function tameFunctionConstructors() {
FERAL_FUNCTION.prototype.constructor('return 1');
} catch (ignore) {
// Throws, no need to patch.
- return harden({});
+ return freeze({});
}
const newIntrinsics = {};

fix(ses): Do not crash under no-unsafe-eval Content Security Policy (#1333)

Co-authored-by: Kris Kowal <kris@cixar.com>