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 empty env https_proxy #793

Open
JasonHonor opened this issue Feb 8, 2025 · 1 comment
Open

panic when empty env https_proxy #793

JasonHonor opened this issue Feb 8, 2025 · 1 comment
Assignees

Comments

@JasonHonor
Copy link

ureq_impl.rs:24

Agent::new_with_defaults().into()

cause panic while starting when there had an empty "https_proxy" env on manjaro linux with "ureq-3.0.3/src/proxy.rs:87:44"

called `Result::unwrap()` on an `Err` value: InvalidUri(Empty)
@jaytaph jaytaph self-assigned this Feb 8, 2025
@jaytaph
Copy link
Member

jaytaph commented Feb 8, 2025

@JasonHonor Thanks for the bug report. It seems that ureq by default tries to detect if a proxy is needed by checking the environment settings (proxy::try_from_env()), however, it assumes that the string passed (by HTTPS_PROXY or any other proyxy env settings) is a correct URI.. It doesn't check if this URI is invalid:

I've added a PR to their repo with a fix. Hopefully they will merge it:

algesten/ureq#990

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