You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Test with server pdo
http://pastebin.com/SVmJiJ3T
//not found the string "OAuth"
if (strcmp(substr($auth_header, 0, 5), "OAuth ") !== 0)
//patch
if (strcmp(substr($auth_header, 0, 5), "OAuth") !== 0)
//not found access_token value
if (preg_match('/\s*OAuth\s*="(.+)"/', substr($auth_header, 5), $matches) == 0
|| count($matches) < 2)
//path
if (preg_match('/OAuth\s.*="(.+)"/', $auth_header, $matches) == 0 ||
count($matches) < 2)
Original issue reported on code.google.com by dmousex on 13 Mar 2011 at 9:04
The text was updated successfully, but these errors were encountered:
Since I'm implementing a server now, one comment on the 2nd patch:
//path
if (preg_match('/OAuth\s.*="(.+)"/', $auth_header, $matches) == 0 ||
count($matches) < 2)
From what I can see from the specs, that's the format for OAuth 1.0 headers and
this should actually be (just the regex):
'/\s*OAuth\s*(.+)/'
If we wanted (half-assed) backwards compatibility, then this works:
'/\s*OAuth\s*=?"?(.+)"?/'
Original issue reported on code.google.com by
dmousex
on 13 Mar 2011 at 9:04The text was updated successfully, but these errors were encountered: