GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test: fix defect path traversal tests · nodejs/node@ae905a8

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • test
    • fixtures/permission
      • fs-traversal.js
    • parallel
      • test-permission-fs-traversal-path.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎test/fixtures/permission/fs-traversal.js‎

Copy file name to clipboardExpand all lines: test/fixtures/permission/fs-traversal.js
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ path.resolve = (s) => s;
1212

1313
const blockedFolder = process.env.BLOCKEDFOLDER;
1414
const allowedFolder = process.env.ALLOWEDFOLDER;
15-
const traversalPath = allowedFolder + '../file.md';
16-
const traversalFolderPath = allowedFolder + '../folder';
17-
const bufferTraversalPath = Buffer.from(allowedFolder + '../file.md');
15+
const traversalPath = allowedFolder + '/../file.md';
16+
const traversalFolderPath = allowedFolder + '/../folder';
17+
const bufferTraversalPath = Buffer.from(traversalPath);
1818
const uint8ArrayTraversalPath = new TextEncoder().encode(traversalPath);
1919

2020
{
Collapse file

‎test/parallel/test-permission-fs-traversal-path.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-permission-fs-traversal-path.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const tmpdir = require('../common/tmpdir');
1818

1919
const file = fixtures.path('permission', 'fs-traversal.js');
2020
const blockedFolder = tmpdir.path;
21-
const allowedFolder = tmpdir.resolve('subdirectory/');
21+
const allowedFolder = tmpdir.resolve('subdirectory');
2222
const commonPathWildcard = path.join(__filename, '../../common*');
2323

2424
{

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.