twitter-async
twitter-async copied to clipboard
Multiple bugs/Not following twitter oAuth specs
I found a couple of bugs while using the library:
BUG 1 EpiOAuth.php (::normalizeUrl()) if($port > 0 && ($scheme === 'http' && $port !== 80) || ($scheme === 'https' && $port !== 443)) The second boolean expression (the one compounded with a OR ) should be taken in parenthesis, otherwise it the expression returns TRUE for all https connections, where no specific port was present in the url.
BUG2 EpiOauth.php: (::prepareParameters()) array_walk($oauth, array($this, 'encode_rfc3986')); Array walk does not allow to change the values of the array in that way. You need the ::encode_rfc3986() to accept parameters as reference in order to change them.
BUG3 EpiOauth.php: (::generateSignature()) Concatenation of parameters perform double-encoding which spoils the parameter values. The line in question: $concatenatedParams = $this->encode_rfc3986(substr($concatenatedParams, 0, -3));