mirror of
https://github.com/denoland/deno.git
synced 2025-09-26 12:19:12 +00:00
fix: do special file permission check for check_read_path
(#27989)
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
This commit is contained in:
parent
7253820764
commit
cda0c5b3ae
9 changed files with 116 additions and 33 deletions
|
@ -1692,6 +1692,15 @@ Deno.test({ permissions: { read: false } }, async function fetchFilePerm() {
|
|||
}, Deno.errors.NotCapable);
|
||||
});
|
||||
|
||||
Deno.test(
|
||||
{ permissions: { read: true }, ignore: Deno.build.os !== "linux" },
|
||||
async function fetchSpecialFilePerm() {
|
||||
await assertRejects(async () => {
|
||||
await fetch("file:///proc/self/environ");
|
||||
}, Deno.errors.NotCapable);
|
||||
},
|
||||
);
|
||||
|
||||
Deno.test(
|
||||
{ permissions: { read: false } },
|
||||
async function fetchFilePermDoesNotExist() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue