| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -138,7 +138,7 @@ const config = fs.readFileSync('/etc/myapp/config.json', 'utf8'); | |||
| 138 | 138 | // Drop read access to /etc/myapp after initialization | |
| 139 | 139 | process.permission.drop('fs.read', '/etc/myapp'); | |
| 140 | 140 | ||
| 141 | - // This will now throw ERR_ACCESS_DENIED | ||
| 141 | + // This will now return false | ||
| 142 | 142 | process.permission.has('fs.read', '/etc/myapp/config.json'); // false | |
| 143 | 143 | ||
| 144 | 144 | // Drop child process permission entirely | |
@@ -219,7 +219,7 @@ $ node --permission index.js | |||
| 219 | 219 | * `index.js` will be included in the allowed file system read list | |
| 220 | 220 | ||
| 221 | 221 | ```console | |
| 222 | - $ node -r /path/to/custom-require.js --permission index.js. | ||
| 222 | + $ node -r /path/to/custom-require.js --permission index.js | ||
| 223 | 223 | ``` | |
| 224 | 224 | ||
| 225 | 225 | * `/path/to/custom-require.js` will be included in the allowed file system read | |
| Back | FazBrowse Home | New Git URL |
0 commit comments