Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed strtolower() when preparing URL. #56

Closed
wants to merge 2 commits into from
Closed

Removed strtolower() when preparing URL. #56

wants to merge 2 commits into from

Conversation

uzyn
Copy link

@uzyn uzyn commented Jun 9, 2012

Some providers, like LinkedIn, uses a case-sensitive URL which includes capital letters.

Some examples:
https://api.linkedin.com/uas/oauth/requestToken
https://api.linkedin.com/uas/oauth/accessToken

Reference: https://developer.linkedin.com/documents/linkedins-oauth-details

@themattharris
Copy link
Owner

thanks for this and great catch - as per 3.4.2.1 in the OAuth spec the scheme and host MUST be lowercase, but not the path. your diff fixes the path but leave the schema and host exposed to mixed case issues.

instead i was going to do this:

    // the scheme and host MUST be lowercase
    $this->url = strtolower("$scheme://$host");
    // but not the path
    $this->url .= $path;

if you can update your diff to match that, i'll merge your pull request in.

themattharris pushed a commit that referenced this pull request Sep 4, 2012
- changed version numbers to x.y.z format
- stronger method scoping (public and private)
- Typo fix in depenencies. (Issue #42) Props: tantek
- Only lowercase the host and scheme, and not path, in prepare_url. (Issue #56) Props: uzyn
- Fixed a number of PHP warnings by changing some tmhUtilty methods to static. (Issue #52) Props: DrayChou
- Raw headers and response body are now available as `$tmhOAuth->response['raw']`
- Moved the examples to their own repository <https://github.com/themattharris/tmhOAuth-examples>
- Removed the `noexamples` branch as master does not contain examples anymore
- Introduced `$tmhOAuth->config['timezone']` and set `date_default_timezone_set`. (Issue #70) Props: iamctodd
@themattharris
Copy link
Owner

all merged into 0.70. props given in readme and the commit message

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

Successfully merging this pull request may close these issues.

None yet

2 participants