Commit 73ad72e
authored
fix(eval): improve security of safe-eval (#233)
* block reading properties 'constructor', '__proto__', '__defineGetter__', '__defineSetter__' if they are not owned by the object.
* allow only expected variables in global scope ( removing constructor, __proto__, etc from global scope )
* Remove previous patches to fix security issues. Ensure no breakage by adding unit tests
* chore: remove unnecessary changes and rebuild docs
rebuild docs using `pnpm run license-badges && pnpm run build-docs && pnpm run lint && pnpm run test`, remove unnecessary changes in test/test.safe-eval.js and badges/license-badge-dev.svg1 parent 93612a3 commit 73ad72e
File tree
22 files changed
+173
-172
lines changed- badges
- dist
- docs/ts
- classes
- functions
- interfaces
- types
- src
- test
22 files changed
+173
-172
lines changedLoading
Loading
Loading
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1203 | 1203 | | |
1204 | 1204 | | |
1205 | 1205 | | |
| 1206 | + | |
1206 | 1207 | | |
1207 | 1208 | | |
1208 | 1209 | | |
| |||
1285 | 1286 | | |
1286 | 1287 | | |
1287 | 1288 | | |
1288 | | - | |
| 1289 | + | |
1289 | 1290 | | |
1290 | 1291 | | |
1291 | 1292 | | |
| |||
1294 | 1295 | | |
1295 | 1296 | | |
1296 | 1297 | | |
1297 | | - | |
1298 | | - | |
1299 | | - | |
1300 | 1298 | | |
1301 | 1299 | | |
1302 | 1300 | | |
| 1301 | + | |
| 1302 | + | |
| 1303 | + | |
| 1304 | + | |
| 1305 | + | |
| 1306 | + | |
1303 | 1307 | | |
1304 | 1308 | | |
1305 | | - | |
1306 | | - | |
1307 | | - | |
1308 | | - | |
1309 | | - | |
1310 | | - | |
1311 | | - | |
1312 | | - | |
1313 | | - | |
1314 | 1309 | | |
1315 | 1310 | | |
1316 | 1311 | | |
| |||
1332 | 1327 | | |
1333 | 1328 | | |
1334 | 1329 | | |
1335 | | - | |
1336 | | - | |
1337 | | - | |
| 1330 | + | |
| 1331 | + | |
| 1332 | + | |
1338 | 1333 | | |
1339 | 1334 | | |
1340 | 1335 | | |
1341 | 1336 | | |
1342 | 1337 | | |
1343 | 1338 | | |
1344 | 1339 | | |
1345 | | - | |
1346 | | - | |
1347 | | - | |
1348 | 1340 | | |
1349 | 1341 | | |
1350 | 1342 | | |
| |||
1369 | 1361 | | |
1370 | 1362 | | |
1371 | 1363 | | |
1372 | | - | |
1373 | | - | |
1374 | | - | |
| 1364 | + | |
| 1365 | + | |
1375 | 1366 | | |
1376 | 1367 | | |
1377 | 1368 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1209 | 1209 | | |
1210 | 1210 | | |
1211 | 1211 | | |
| 1212 | + | |
1212 | 1213 | | |
1213 | 1214 | | |
1214 | 1215 | | |
| |||
1291 | 1292 | | |
1292 | 1293 | | |
1293 | 1294 | | |
1294 | | - | |
| 1295 | + | |
1295 | 1296 | | |
1296 | 1297 | | |
1297 | 1298 | | |
| |||
1300 | 1301 | | |
1301 | 1302 | | |
1302 | 1303 | | |
1303 | | - | |
1304 | | - | |
1305 | | - | |
1306 | 1304 | | |
1307 | 1305 | | |
1308 | 1306 | | |
| 1307 | + | |
| 1308 | + | |
| 1309 | + | |
| 1310 | + | |
| 1311 | + | |
| 1312 | + | |
1309 | 1313 | | |
1310 | 1314 | | |
1311 | | - | |
1312 | | - | |
1313 | | - | |
1314 | | - | |
1315 | | - | |
1316 | | - | |
1317 | | - | |
1318 | | - | |
1319 | | - | |
1320 | 1315 | | |
1321 | 1316 | | |
1322 | 1317 | | |
| |||
1338 | 1333 | | |
1339 | 1334 | | |
1340 | 1335 | | |
1341 | | - | |
1342 | | - | |
1343 | | - | |
| 1336 | + | |
| 1337 | + | |
| 1338 | + | |
1344 | 1339 | | |
1345 | 1340 | | |
1346 | 1341 | | |
1347 | 1342 | | |
1348 | 1343 | | |
1349 | 1344 | | |
1350 | 1345 | | |
1351 | | - | |
1352 | | - | |
1353 | | - | |
1354 | 1346 | | |
1355 | 1347 | | |
1356 | 1348 | | |
| |||
1375 | 1367 | | |
1376 | 1368 | | |
1377 | 1369 | | |
1378 | | - | |
1379 | | - | |
1380 | | - | |
| 1370 | + | |
| 1371 | + | |
1381 | 1372 | | |
1382 | 1373 | | |
1383 | 1374 | | |
| |||
Large diffs are not rendered by default.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1204 | 1204 | | |
1205 | 1205 | | |
1206 | 1206 | | |
| 1207 | + | |
1207 | 1208 | | |
1208 | 1209 | | |
1209 | 1210 | | |
| |||
1286 | 1287 | | |
1287 | 1288 | | |
1288 | 1289 | | |
1289 | | - | |
| 1290 | + | |
1290 | 1291 | | |
1291 | 1292 | | |
1292 | 1293 | | |
| |||
1295 | 1296 | | |
1296 | 1297 | | |
1297 | 1298 | | |
1298 | | - | |
1299 | | - | |
1300 | | - | |
1301 | 1299 | | |
1302 | 1300 | | |
1303 | 1301 | | |
| 1302 | + | |
| 1303 | + | |
| 1304 | + | |
| 1305 | + | |
| 1306 | + | |
| 1307 | + | |
1304 | 1308 | | |
1305 | 1309 | | |
1306 | | - | |
1307 | | - | |
1308 | | - | |
1309 | | - | |
1310 | | - | |
1311 | | - | |
1312 | | - | |
1313 | | - | |
1314 | | - | |
1315 | 1310 | | |
1316 | 1311 | | |
1317 | 1312 | | |
| |||
1333 | 1328 | | |
1334 | 1329 | | |
1335 | 1330 | | |
1336 | | - | |
1337 | | - | |
1338 | | - | |
| 1331 | + | |
| 1332 | + | |
| 1333 | + | |
1339 | 1334 | | |
1340 | 1335 | | |
1341 | 1336 | | |
1342 | 1337 | | |
1343 | 1338 | | |
1344 | 1339 | | |
1345 | 1340 | | |
1346 | | - | |
1347 | | - | |
1348 | | - | |
1349 | 1341 | | |
1350 | 1342 | | |
1351 | 1343 | | |
| |||
1370 | 1362 | | |
1371 | 1363 | | |
1372 | 1364 | | |
1373 | | - | |
1374 | | - | |
1375 | | - | |
| 1365 | + | |
| 1366 | + | |
1376 | 1367 | | |
1377 | 1368 | | |
1378 | 1369 | | |
| |||
0 commit comments