| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 6e550b1 commit fcf82ad
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -27,7 +27,7 @@ const path = require('path'); | |||
| 27 | 27 | } | |
| 28 | 28 | ||
| 29 | 29 | { | |
| 30 | - const tmpPath = path.resolve('/tmp/'); | ||
| 30 | + const tmpPath = path.resolve('./tmp/'); | ||
| 31 | 31 | const { status, stdout } = spawnSync( | |
| 32 | 32 | process.execPath, | |
| 33 | 33 | [ | |
@@ -36,7 +36,7 @@ const path = require('path'); | |||
| 36 | 36 | `console.log(process.permission.has("fs")); | |
| 37 | 37 | console.log(process.permission.has("fs.read")); | |
| 38 | 38 | console.log(process.permission.has("fs.write")); | |
| 39 | - console.log(process.permission.has("fs.write", "/tmp/"));`, | ||
| 39 | + console.log(process.permission.has("fs.write", "./tmp/"));`, | ||
| 40 | 40 | ] | |
| 41 | 41 | ); | |
| 42 | 42 | const [fs, fsIn, fsOut, fsOutAllowed] = stdout.toString().split('\n'); | |
@@ -138,6 +138,9 @@ const path = require('path'); | |||
| 138 | 138 | if (firstPath.startsWith('/etc')) { | |
| 139 | 139 | common.skip('/etc as firstPath'); | |
| 140 | 140 | } | |
| 141 | + if (firstPath.startsWith('/tmp')) { | ||
| 142 | + common.skip('/tmp as firstPath'); | ||
| 143 | + } | ||
| 141 | 144 | const file = fixtures.path('permission', 'loader', 'index.js'); | |
| 142 | 145 | const { status, stderr } = spawnSync( | |
| 143 | 146 | process.execPath, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -7,8 +7,8 @@ const assert = require('assert'); | |||
| 7 | 7 | const path = require('path'); | |
| 8 | 8 | ||
| 9 | 9 | { | |
| 10 | - const tmpPath = path.resolve('/tmp/'); | ||
| 11 | - const otherPath = path.resolve('/other-path/'); | ||
| 10 | + const tmpPath = path.resolve('./tmp/'); | ||
| 11 | + const otherPath = path.resolve('./other-path/'); | ||
| 12 | 12 | const { status, stdout } = spawnSync( | |
| 13 | 13 | process.execPath, | |
| 14 | 14 | [ | |
@@ -17,8 +17,8 @@ const path = require('path'); | |||
| 17 | 17 | `console.log(process.permission.has("fs")); | |
| 18 | 18 | console.log(process.permission.has("fs.read")); | |
| 19 | 19 | console.log(process.permission.has("fs.write")); | |
| 20 | - console.log(process.permission.has("fs.write", "/tmp/")); | ||
| 21 | - console.log(process.permission.has("fs.write", "/other-path/"));`, | ||
| 20 | + console.log(process.permission.has("fs.write", "./tmp/")); | ||
| 21 | + console.log(process.permission.has("fs.write", "./other-path/"));`, | ||
| 22 | 22 | ] | |
| 23 | 23 | ); | |
| 24 | 24 | const [fs, fsIn, fsOut, fsOutAllowed1, fsOutAllowed2] = stdout.toString().split('\n'); | |
@@ -31,8 +31,8 @@ const path = require('path'); | |||
| 31 | 31 | } | |
| 32 | 32 | ||
| 33 | 33 | { | |
| 34 | - const tmpPath = path.resolve('/tmp/'); | ||
| 35 | - const pathWithComma = path.resolve('/other,path/'); | ||
| 34 | + const tmpPath = path.resolve('./tmp/'); | ||
| 35 | + const pathWithComma = path.resolve('./other,path/'); | ||
| 36 | 36 | const { status, stdout } = spawnSync( | |
| 37 | 37 | process.execPath, | |
| 38 | 38 | [ | |
@@ -45,8 +45,8 @@ const path = require('path'); | |||
| 45 | 45 | `console.log(process.permission.has("fs")); | |
| 46 | 46 | console.log(process.permission.has("fs.read")); | |
| 47 | 47 | console.log(process.permission.has("fs.write")); | |
| 48 | - console.log(process.permission.has("fs.write", "/tmp/")); | ||
| 49 | - console.log(process.permission.has("fs.write", "/other,path/"));`, | ||
| 48 | + console.log(process.permission.has("fs.write", "./tmp/")); | ||
| 49 | + console.log(process.permission.has("fs.write", "./other,path/"));`, | ||
| 50 | 50 | ] | |
| 51 | 51 | ); | |
| 52 | 52 | const [fs, fsIn, fsOut, fsOutAllowed1, fsOutAllowed2] = stdout.toString().split('\n'); | |
@@ -59,7 +59,7 @@ const path = require('path'); | |||
| 59 | 59 | } | |
| 60 | 60 | ||
| 61 | 61 | { | |
| 62 | - const filePath = path.resolve('/tmp/file,with,comma.txt'); | ||
| 62 | + const filePath = path.resolve('./tmp/file,with,comma.txt'); | ||
| 63 | 63 | const { status, stdout, stderr } = spawnSync( | |
| 64 | 64 | process.execPath, | |
| 65 | 65 | [ | |
@@ -70,7 +70,7 @@ const path = require('path'); | |||
| 70 | 70 | `console.log(process.permission.has("fs")); | |
| 71 | 71 | console.log(process.permission.has("fs.read")); | |
| 72 | 72 | console.log(process.permission.has("fs.write")); | |
| 73 | - console.log(process.permission.has("fs.write", "/tmp/file,with,comma.txt"));`, | ||
| 73 | + console.log(process.permission.has("fs.write", "./tmp/file,with,comma.txt"));`, | ||
| 74 | 74 | ] | |
| 75 | 75 | ); | |
| 76 | 76 | const [fs, fsIn, fsOut, fsOutAllowed] = stdout.toString().split('\n'); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments