Skip to content

Harden Uri parsing #1445

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

Closed
slandelle opened this issue Jul 31, 2017 · 0 comments
Closed

Harden Uri parsing #1445

slandelle opened this issue Jul 31, 2017 · 0 comments
Assignees
Milestone

Comments

@slandelle
Copy link
Contributor

Following #1442, we shouldn't accept Uri with empty scheme or empty host, such as "http://".

@slandelle slandelle added this to the 2.0.34 milestone Jul 31, 2017
@slandelle slandelle self-assigned this Jul 31, 2017
slandelle added a commit that referenced this issue Jul 31, 2017
Motivation:

Following #1442, we shouldn't accept Uri with empty scheme or empty
host, such as "http://".

Modifications:

* Introduce MiscUtils#isEmpty(String)
* Throw IllegalArgumentException on empty scheme or host, with message
mentioning missing field and original url

Result:

Better control on Uri that could cause AHC to choke
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant