Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Panic when passing wildcard to allow-net #23552

Open
iMarv opened this issue Apr 25, 2024 · 5 comments
Open

Panic when passing wildcard to allow-net #23552

iMarv opened this issue Apr 25, 2024 · 5 comments
Labels
bug Something isn't working cli related to cli/ dir

Comments

@iMarv
Copy link

iMarv commented Apr 25, 2024

Platform: linux x86_64
Version: 1.42.1
Args: ["deno", "run", "--allow-read", "--allow-write=notion-next", "--allow-net=api.notion.com,*.amazonaws.com", "--allow-env", "main.ts"]

thread 'main' panicked at runtime/permissions/lib.rs:741:22:
called Result::unwrap() on an Err value: InvalidLabelChar

@marvinhagemeister marvinhagemeister added bug Something isn't working cli related to cli/ dir labels Apr 25, 2024
@yazan-nidal
Copy link

Please provide a reproducible example and more info

@iMarv
Copy link
Author

iMarv commented Apr 29, 2024

That in itself should be reproducible with an empty main.ts, as it seems to be a bug with parsing in the cli itself.

@yazan-nidal
Copy link

Hi @mmastrac @iMarv,
I checked the issue and ,
it was fixed by this PR
#23590
so can u please review it?

@yazan-nidal
Copy link

@iMarv @mmastrac

what the expected outcome?

@iMarv
Copy link
Author

iMarv commented May 4, 2024

It should not panic I guess.

I am not a maintainer, but I would figure that it shall throw some error that wildcards are not allowed.

yazan-nidal added a commit to yazan-nidal/deno that referenced this issue May 6, 2024
…n! macro

This commit addresses issue (denoland#23294 , denoland#23552) by enhancing the error handling and dot handling logic within the fqdn! macro. Specifically, it:

Handles parsing errors gracefully using pattern matching instead of unwrap().
Adjusts substring parsing to correctly handle domain names ending with a dot.
This change improves the reliability and robustness of the fqdn! macro, ensuring more accurate parsing of fully qualified domain names.

Fixes: denoland#23294 , denoland#23552
yazan-nidal added a commit to yazan-nidal/deno that referenced this issue May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cli related to cli/ dir
Projects
None yet
Development

No branches or pull requests

3 participants