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

Getting exception for certain URLs that work with curl and other tools #60

Closed
erezsh opened this issue Apr 1, 2018 · 4 comments
Closed

Comments

@erezsh
Copy link

erezsh commented Apr 1, 2018

I'm not really sure how to describe this in idna terms. I never used idna directly.

Here's the issue I opened for requests: psf/requests#4569

They told me to hand it over to you (they're too lazy to do it themselves).

Anyway, hope this is helpful. Sorry if not.

P.S. here's the exception, just for convenience:

idna.core.IDNAError: The label b'xn--mn8ha4uc' is not a valid A-label
@kjd
Copy link
Owner

kjd commented Apr 2, 2018

What is the expected behavior? The domain name is not a legal IDN. That said, is it being passed as a A-label or as a U-label? Is the expectation to pass-through the invalid label?

See #18 (comment) for related discussion.

@erezsh
Copy link
Author

erezsh commented Apr 2, 2018

Honestly, I don't know. But I do know that if I put that url in curl, firefox/chrome, or even a different configuration of requests, then it works.

So it seems to me that it's either a bug in idna, or you're enforcing a standard that no-one else cares about..

@jribbens
Copy link
Collaborator

jribbens commented Apr 2, 2018

I think it's a bug in pyopenssl; the name contains emoji and hence idna is right to refuse it, but it's not actually the domain name you're fetching, it's just a redundant subjectAltName on an SSL cert, so pyopenssl should just be ignoring the invalid altName.

@kjd
Copy link
Owner

kjd commented Apr 10, 2018

Per @jribbens, the root issue here seems to be pyopenssl trying to do an unnecessary IDNA conversion that is not relevant to the operation (which is connecting to https://thegroovecartel.com/feed/ per the parent issue in the requests library). Closing.

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

3 participants