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

Added SanitizeHost to fix host / hostname with protocol #58

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

cainaleaouk
Copy link

I've added a method to remove http and https protocols in case the user passes it in the request. It might be an edge case but improves the safety of the code. Also added some test cases.

@hassankhan
Copy link

hassankhan commented Nov 30, 2017

+1 is there something preventing this PR from being merged? Would love to see it in a release 😄

@mhart
Copy link
Owner

mhart commented Nov 30, 2017

Yeah, hard to balance something like this – a host isn't a URL, so I'm not sure it's really justified adding code to cover this edge case

@hassankhan
Copy link

I somewhat agree, if the library shouldn't sanitise, then it could at least throw some sort of validation error?

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

Successfully merging this pull request may close these issues.

3 participants