From 74ac29bae666cd910c6f66d47b20e3209afc1fe7 Mon Sep 17 00:00:00 2001 From: Luca Casonato Date: Fri, 5 Jul 2024 23:45:06 +0100 Subject: fix(permissions): handle ipv6 addresses correctly (#24397) Also don't panic on invalid domain names and addresses. Extracted with cleanups up from #24080 Co-authored-by: Yazan AbdAl-Rahman --- tests/testdata/dynamic_import/permissions_blob_remote.ts.out | 2 +- tests/testdata/dynamic_import/permissions_data_remote.ts.out | 2 +- tests/testdata/dynamic_import/permissions_remote_remote.ts.out | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/testdata/dynamic_import') diff --git a/tests/testdata/dynamic_import/permissions_blob_remote.ts.out b/tests/testdata/dynamic_import/permissions_blob_remote.ts.out index a00c02d72..f436a5eb8 100644 --- a/tests/testdata/dynamic_import/permissions_blob_remote.ts.out +++ b/tests/testdata/dynamic_import/permissions_blob_remote.ts.out @@ -1,4 +1,4 @@ -error: Uncaught (in promise) TypeError: Requires net access to "example.com", run again with the --allow-net flag +error: Uncaught (in promise) TypeError: Requires net access to "example.com:443", run again with the --allow-net flag at blob:null/[WILDCARD]:1:8 await import(URL.createObjectURL(blob)); ^ diff --git a/tests/testdata/dynamic_import/permissions_data_remote.ts.out b/tests/testdata/dynamic_import/permissions_data_remote.ts.out index cb2a7ccf7..00248e277 100644 --- a/tests/testdata/dynamic_import/permissions_data_remote.ts.out +++ b/tests/testdata/dynamic_import/permissions_data_remote.ts.out @@ -1,4 +1,4 @@ -error: Uncaught (in promise) TypeError: Requires net access to "example.com", run again with the --allow-net flag +error: Uncaught (in promise) TypeError: Requires net access to "example.com:443", run again with the --allow-net flag at data:application/javascript;base64,aW1wb3J0ICJodHRwczovL2V4YW1wbGUuY29tL3NvbWUvZmlsZS50cyI7:1:8 await import(`data:application/javascript;base64,${btoa(code)}`); ^ diff --git a/tests/testdata/dynamic_import/permissions_remote_remote.ts.out b/tests/testdata/dynamic_import/permissions_remote_remote.ts.out index bd88dd4d9..0e8b0fc1f 100644 --- a/tests/testdata/dynamic_import/permissions_remote_remote.ts.out +++ b/tests/testdata/dynamic_import/permissions_remote_remote.ts.out @@ -1,4 +1,4 @@ -error: Uncaught (in promise) TypeError: Requires net access to "example.com", run again with the --allow-net flag +error: Uncaught (in promise) TypeError: Requires net access to "example.com:443", run again with the --allow-net flag at http://localhost:4545/dynamic_import/static_remote.ts:2:8 await import( ^ -- cgit v1.2.3