twitter-async icon indicating copy to clipboard operation
twitter-async copied to clipboard

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

Open massar opened this issue 10 years ago • 0 comments

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.

massar avatar Oct 02 '15 14:10 massar