Skip to content
This repository has been archived by the owner on Dec 4, 2018. It is now read-only.

Don't bind to interface based on SERVER_ADDR, as that might be IPv6 and Twitter does not do IPv6 #206

Open
massar opened this issue Oct 2, 2015 · 0 comments

Comments

@massar
Copy link

massar commented Oct 2, 2015

In EpiOAuth.php there is a:

curl_setopt($ch, CURLOPT_INTERFACE, $_SERVER ['SERVER_ADDR']);

If you have an IPv6 address on your server, SERVER_ADDR will contain that. Curl then binds to that, and tries to contact twitter, who do not have IPv6 and voila, all falls apart. Magically as there is no curl_errno() check.

When added and from number translated to string you get:
"Failed binding local connection end"

Adding a curl_errno() and reporting that error is btw a wise thing, otherwise, well, you get a long waste of time.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant