php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59252 EXC_BAD_ACCESS when calling checkOAuthRequest()
Submitted: 2010-06-04 06:19 UTC Modified: 2010-06-14 02:37 UTC
From: mattias at bomelin dot com Assigned:
Status: No Feedback Package: oauth (PECL)
PHP Version: 5.3.2 OS: 10.6.3
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2010-06-04 06:19 UTC] mattias at bomelin dot com
Description:
------------
See code sample and backtrace below.

Reproduce code:
---------------
Server: 

$provider = new OAuthProvider();
$provider->consumerHandler(array($this, 'lookupConsumer'));
$provider->timestampNonceHandler(array($this, 'timestampNonceChecker'));
$provider->tokenHandler(array($this, 'tokenHandler'));
$provider->setRequestTokenPath('/oauth/request_token');
$provider->checkOAuthRequest();

function lookupConsumer($provider)
{
	$provider->consumer_secret = 'cons_secret';
	return OAUTH_OK;
}
function timestampNonceChecker($provider)
{
	return OAUTH_OK;
}
function tokenHandler($provider)
{
	return OAUTH_TOKEN_REJECTED;
}



CLIENT:
$oauth = new OAuth('cons_key', 'cons_secret', OAUTH_SIG_METHOD_HMACSHA1, OAUTH_AUTH_TYPE_URI);
$request_token_info = $oauth->getRequestToken('http://mysite.local/oauth/request_token');


Actual result:
--------------
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000014
0x00000001011cc984 in convert_to_long ()


#0  0x00000001011cc984 in convert_to_long ()
#1  0x00000001007f0908 in zim_oauthprovider_checkOAuthRequest ()
#2  0x00000001011fbc5a in zend_do_fcall_common_helper_SPEC ()
#3  0x00000001011f7ffb in execute ()
#4  0x00000001011d3a1b in zend_execute_scripts ()
#5  0x000000010117c6b2 in php_execute_script ()
#6  0x0000000101262b1c in php_handler ()
#7  0x00000001000013ab in ap_run_handler ()
#8  0x000000010000322a in ap_invoke_handler ()
#9  0x0000000100024af4 in ap_internal_redirect ()
#10 0x00000001007c415d in handler_redirect ()
#11 0x00000001000013ab in ap_run_handler ()
#12 0x000000010000322a in ap_invoke_handler ()
#13 0x0000000100024cb8 in ap_process_request ()
#14 0x0000000100021908 in ap_process_http_connection ()
#15 0x000000010000eafb in ap_run_process_connection ()
#16 0x000000010002956d in child_main ()
#17 0x000000010002978f in make_child ()
#18 0x000000010002a419 in ap_mpm_run ()
#19 0x0000000100007d68 in main ()


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-06-04 10:16 UTC] jawed@php.net
This is what I get when I try to use the reproduce code:

[Fri Jun 04 07:07:03 2010] [error] PHP Warning:  
OAuthProvider::consumerHandler() expects parameter 1 to be a 
valid callback, first array member is not a valid class name 
or object in /var/www/oauth/request_token.php on line 4
[Fri Jun 04 07:07:03 2010] [error] PHP Warning:  
OAuthProvider::timestampNonceHandler() expects parameter 1 
to be a valid callback, first array member is not a valid 
class name or object in /var/www/oauth/request_token.php on 
line 5
[Fri Jun 04 07:07:03 2010] [error] PHP Warning:  
OAuthProvider::tokenHandler() expects parameter 1 to be a 
valid callback, first array member is not a valid class name 
or object in /var/www/oauth/request_token.php on line 6
[Fri Jun 04 07:07:03 2010] [error] PHP Fatal error:  
OAuthProvider::checkOAuthRequest(): Failed to detect HTTP 
method, set a HTTP method via 
OAuthProvider::checkOAuthRequest() in 
/var/www/oauth/request_token.php on line 8
 [2010-06-04 17:31 UTC] jawed@php.net
Felipe seems to have found the problem, I have a fix for it, 
can you please try to re-produce against trunk?

- JJ
 [2010-06-14 02:37 UTC] datibbaw@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 01:01:28 2024 UTC