Skip to content

Commit

Permalink
fix: rename fixtures to avoid triggering malware
Browse files Browse the repository at this point in the history
  • Loading branch information
madrussa committed Jan 7, 2025
1 parent 4826d1b commit 624499e
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 3 deletions.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions test/send.1.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -315,14 +315,14 @@ test('send(file, options)', function (t) {
t.test('should 403 for dotfile in directory', function (t) {
t.plan(1)
request(createServer({ dotfiles: 'deny', root: fixtures }))
.get('/pets/.hidden')
.get('/pets/.hidden.txt')
.expect(403, err => t.error(err))
})

t.test('should 403 for dotfile in dotfile directory', function (t) {
t.plan(1)
request(createServer({ dotfiles: 'deny', root: fixtures }))
.get('/.mine/.hidden')
.get('/.mine/.hidden.txt')
.expect(403, err => t.error(err))
})

Expand Down
2 changes: 1 addition & 1 deletion test/send.3.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ test('send(file)', function (t) {
request(app)
.get('/pets')
.expect('Content-Type', 'text/plain; charset=utf-8')
.expect(200, '.hidden\nindex.html\n', err => t.error(err))
.expect(200, '.hidden.txt\nindex.html\n', err => t.error(err))
})

t.test('serving from a root directory with custom error-handling', function (t) {
Expand Down

0 comments on commit 624499e

Please sign in to comment.