Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed path traversal issue #12

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
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
Prev Previous commit
updated project and test to work in CI pipeline
  • Loading branch information
sr1ch1 committed Feb 29, 2020
commit ca65238855faa0bb557180c4547dbce4377e30a9
5 changes: 2 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
sudo: false
language: node_js
node_js:
- '8'
- '6'
- '4'
- '12'
- '10'
14 changes: 13 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@
"url": "https://github.com/kevva"
},
"engines": {
"node": ">=4"
"node": ">=7.6"
},
"scripts": {
"test": "xo && ava"
@@ -31,8 +31,20 @@
},
"devDependencies": {
"ava": "*",
"esm": "^3.2.25",
"is-jpg": "^1.0.0",
"pify": "^3.0.0",
"xo": "*"
},
"xo": {
"rules": {
"promise/prefer-await-to-then": "off",
"quotes": "off"
}
},
"ava": {
"require": [
"esm"
]
}
}
5 changes: 4 additions & 1 deletion test.js
Original file line number Diff line number Diff line change
@@ -49,5 +49,8 @@ test('extract broken file', async t => {
});

test('throw on wrong input', async t => {
await t.throws(m()('foo'), 'Expected a Buffer or Stream, got string');
const error = await t.throwsAsync(async () => {
await m()('foo');
});
t.is(error.message, 'Expected a Buffer or Stream, got string');
});