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

Fix URI validation #2

Open
KellerFuchs opened this issue Nov 26, 2015 · 2 comments
Open

Fix URI validation #2

KellerFuchs opened this issue Nov 26, 2015 · 2 comments

Comments

@KellerFuchs
Copy link
Member

The current code rejects perfectly valid URLs, due to uri.host != nil.

More generally, Elixir's parser is not validating. I will investigate using ex_uri for that purpose.
@annwenn Would ex_uri be an acceptable dependency to pull in?

@ghost
Copy link

ghost commented Nov 26, 2015

due to uri.host != nil

Yes, so people don't fill the database with garbage. But alas it also rejects aliased domains.

I will investigate using ex_uri for that purpose

Yeah of course, poke around with ex_uri

Would ex_uri be an acceptable dependency to pull in?

Once the aforementioned poking will produce results, we'll think about that (I'm not fundamentally opposed, though)

@KellerFuchs
Copy link
Member Author

due to uri.host != nil

Yes, so people don't fill the database with garbage. But alas it also rejects aliased domains.

Yes, I didn't say we should not do validation at all.

The specific case that made me investigate was that I tried to shorten a data URI =^.^'=

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

1 participant