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

Add a tests to check domain with port in network-requester allowed.list #3870

Open
benedettadavico opened this issue Sep 11, 2023 · 1 comment

Comments

@benedettadavico
Copy link
Contributor

No description provided.

@jstuczyn
Copy link
Contributor

For the context, the issue here is that our allow list doesn't correctly take ports into consideration, so:

#[tokio::test]
async fn test() {
    // this fails
    let mut filter = setup_with_allowed(&["4.2.2.2:53"]);
    assert!(filter.check("4.2.2.2:53").await);

    // this works (as expected)
    let mut filter = setup_with_allowed(&["4.2.2.2"]);
    assert!(filter.check("4.2.2.2:53").await);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants