| Issue 15: | Not found "OAuth" and access_token on getAccessTokenParams() | |
| 5 people starred this issue and may be notified of changes. | Back to list |
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)
May 16, 2011
#1
jens.k...@gmail.com
Jun 1, 2011
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*=?"?(.+)"?/'
Jan 18, 2012
I also had to make both these changes to get it working. |