Skip to content
Merged
Show file tree
Hide file tree
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
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@
},
"overrides": {
"braces": "$braces",
"http-cache-semantics": "$http-cache-semantics"
"http-cache-semantics": "$http-cache-semantics",
"tinypool": "2.1.2"
},
"browserslist": {
"production": [
Expand Down
10 changes: 10 additions & 0 deletions tests/fixtures/tinypool/legitimate-worker.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/**
* Fixture worker for tests/tinypool-security.test.mjs.
*
* The worker a pool is constructed with. It reports who processed the task
* so a test can tell the two fixtures apart from the response alone.
*/
export default async (task) => ({
by: 'legitimate',
processed: task,
});
11 changes: 11 additions & 0 deletions tests/fixtures/tinypool/malicious-worker.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/**
* Fixture worker for tests/tinypool-security.test.mjs.
*
* The worker an attacker would point Object.prototype.filename at. Its
* response shape is different on purpose: any result carrying `stolen`
* proves the task was redirected away from the legitimate worker.
*/
export default async (task) => ({
by: 'attacker',
stolen: task,
});
Loading
Loading