php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59149 PHP crash
Submitted: 2010-04-08 11:26 UTC Modified: 2010-04-09 08:34 UTC
From: airs0urce0 at gmail dot com Assigned:
Status: Closed Package: oauth (PECL)
PHP Version: 5.2.9 OS: Mac OS X 10.5.8, may be other
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: airs0urce0 at gmail dot com
New email:
PHP Version: OS:

 

 [2010-04-08 11:26 UTC] airs0urce0 at gmail dot com
Description:
------------
PHP crashes and show empty page if we use integer values for $extra_parameters of fetch() method  


Reproduce code:
---------------
<?php

$o = new OAuth('consumer_key', 'consumer_secret', OAUTH_SIG_METHOD_HMACSHA1);
$o->fetch(
    'http://api.somehost.com/catalog/film', 
    array(
        'f' => 'coming_soon|coming_soon',
        'items_per_page' => 1,
        'start_index' => 652
    
    ), 
    OAUTH_HTTP_METHOD_GET
);


$response = $o->getLastResponse();
header('Content-type: application/xml');
echo $response;

?>

items_per_page and start_index parameters is integer. If we change these values to string then all working fine.

Expected result:
----------------
Any behavior (exception, auto cast int to string), but not crash 

Actual result:
--------------
Just empty page and no any errors 

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-04-08 12:17 UTC] rasmus@php.net
I wasn't able to reproduce this.

On my server I see this request coming into my test end 
point:

GET /info.php?
f=coming_soon%7Ccoming_soon&items_per_page=1&start_index=652 
HTTP/1.1

And looking at the code I see no reason that the type of the 
arguments would make any difference.

You need to either provide a fully working test case with 
the actual end point you are hitting, or you need to get us 
a gdb backtrace of the crash.
 [2010-04-08 19:43 UTC] datibbaw@php.net
Hey,

I remember fixing this in SVN some time ago. Please try the SVN trunk.
 [2010-04-09 02:35 UTC] airs0urce0 at gmail dot com
Hello! Thanks for responses. Datibbaw, it's good, I looked on comments on svn and DIFF of oauth.c. I think problem is solved. Now I can't compile sources from SVN, but I think it will work fine. Meanwhile I will use string values for parameters. Thank you, guys, again!
 [2010-04-09 08:34 UTC] datibbaw@php.net
This bug has been fixed in SVN.

In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on pecl.php.net.

In case this was a pecl.php.net website problem, the change will show
up on the website in short time.
 
Thank you for the report, and for helping us make PECL better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 17:01:58 2024 UTC