vinayapatil / oauth

Automatically exported from code.google.com/p/oauth
0 stars 0 forks source link

php: OAuth.php doesn't handle port numbers correctly #7

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Have a web server listening on port 80
2. Run the example code at
http://groups.google.com/group/opensocial/web/validating-signed-requests-from-or
kut
3. Look at the value of $req->get_normalized_http_url() 

What is the expected output? What do you see instead?
Expect to see: http://domain.tld/file.php
Actually see: http://domain.tld:/file.php

Please provide any additional information below.
The OAuth.php library expects PHP to return "80" for $parts['port'] where
$parts = parse_url($this->http_url); for a server listening on port 80.  It
does not though, in line with the manual:
http://www.php.net/manual/en/function.parse-url.php

Attached is a patch to fix bug, and remove a duplicate line.

Original issue reported on code.google.com by hagfish%...@gtempaccount.com on 29 Jan 2008 at 1:00

Attachments:

GoogleCodeExporter commented 8 years ago

Original comment by leah.culver on 8 Jul 2008 at 4:39

GoogleCodeExporter commented 8 years ago
fixed some time ago, but also updated to fix another bug, see
http://code.google.com/p/oauth/source/detail?r=596

Original comment by andyster on 15 Jul 2008 at 9:52