jofuilu14 / oauth

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

php: strict standards and warnings #158

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. setup php with full error reporting
2. (optional)  Install xdebug
2. run true all parts of example code

Excepted output is no errors, strict warnings, warnings or notices.

Some "errors" from xdebug:
Strict standards: Declaration of MockOAuthDataStore::new_request_token()
should be compatible with that of OAuthDataStore::new_request_token() 
(same goes for new_access_token())

Strict standards: Declaration of MockOAuthDataStore::new_access_token()
should be compatible with that of OAuthDataStore::new_access_token()

Notice: Undefined index: query in
/home/andre/workspace/trunk/extension/ezoauth/lib/_oauth-php/example/client.php
on line 28

Notice: Undefined index: scheme in
/home/andre/workspace/trunk/extension/ezoauth/lib/_oauth-php/OAuth.php on
line 384

Notice: Undefined index: host in
/home/andre/workspace/trunk/extension/ezoauth/lib/_oauth-php/OAuth.php on
line 385

Original issue reported on code.google.com by andre.ro...@gmail.com on 20 Apr 2010 at 11:21

GoogleCodeExporter commented 8 years ago
As for MockOAuthDataStore::new_access_token() and
MockOAuthDataStore::new_request_token(), these should be updated to take 
advantage
verification needed to be in line with 1.0a spec.

In the mean time, do you have any examples on how to make sure it is secure?

Original comment by andre.ro...@gmail.com on 20 Apr 2010 at 2:04

GoogleCodeExporter commented 8 years ago
I'll look into fixing the notices in OAuth.php and in the unit tests. The 
examples should really be updated to 
some that better illustrate how to use the different things..

Original comment by morten.f...@gmail.com on 7 May 2010 at 3:26

GoogleCodeExporter commented 8 years ago
OAuth.php should no longer give any warning as of revision 1230. 
MockOAuthDataStore.php should no longer give any as of revision 1232. 
Example-code is outdated and I didn't want to fix a minor issue with something 
that needs to be replaced anyways..

The new mock datastore still doesn't use the verifier/callback for anything, 
because it is only a mock store to test if signatures are dealt with correctly.
I will eventually produce some new examples that shows it off..

-Morten

Original comment by morten.f...@gmail.com on 12 Jun 2010 at 8:37

GoogleCodeExporter commented 8 years ago
There is a minor left over in rv 1232:
http://code.google.com/p/oauth/source/detail?r=1232

This line is not needed anymore:
$port or $port = ($scheme == 'https') ? '443' : '80';

as it has been tackled by :
$port = isset( $parts['port'] ) && $parts['port'] ? $parts['port'] : ( $scheme 
=== 'https' ? '443' : '80' );

Original comment by andre.ro...@gmail.com on 12 Jun 2010 at 2:21

GoogleCodeExporter commented 8 years ago
Removed the extra line.. Thanks for spotting it..

Original comment by morten.f...@gmail.com on 13 Jun 2010 at 7:52