SOAP module crashes php

Bug #113837 reported by johannes
6
Affects Status Importance Assigned to Milestone
php-soap (Ubuntu)
Fix Released
Undecided
Unassigned
php5 (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: php5

it crashes every time i use the module

Revision history for this message
johannes (j00hannes) wrote :
Revision history for this message
johannes (j00hannes) wrote :

solution:

in SOAP/Server.php

search "->message();"

and replace it with "->message;" (because it's a string not a method)

but anyway, php shouldn't crash when a not existing method is called.

Revision history for this message
Tom Mortimer-Jones (tom-morty) wrote :

Thanks for the bug report.

Please can you post a sample of PHP code that causes this crash so that we can confirm this bug?

As this bug seems to be in SOAP/Server.php I am changing the package from php5 to php-soap.

Revision history for this message
johannes (j00hannes) wrote :

<?php
  class Service
  {
  }

  require_once('SOAP/Server.php');
  $soap = new SOAP_Server();
  $service = new Service();

  $soap->addObjectMap($service,'urn:soapservice');
  $soap->service($GLOBALS['HTTP_RAW_POST_DATA']); // <= here

?>

the line causing the crash is marked in the source code.

it seems to be a problem of php5 as well because the application crashes caused by an error in the source code of soap. normally it should throw an error instead of jumping to a non existing class method.

Revision history for this message
Tom Mortimer-Jones (tom-morty) wrote :

Thank you for posting the code.

I can confirm that this does cause PHP to crash and that changing ->message() to ->message in Server.php causes the bug to disappear.

This may be two bugs then - one in php-soap which causes the crash in php5.

Changed in php-soap:
status: Unconfirmed → Confirmed
Revision history for this message
johannes (j00hannes) wrote :

so shall a new bugreport be created for php5?

Revision history for this message
Tom Mortimer-Jones (tom-morty) wrote :

I've linked the bug to both packages now.

Changed in php5:
status: Unconfirmed → Confirmed
Revision history for this message
Soren Hansen (soren) wrote :

Grr... Ok, I've spent hours and hours debugging this..

For one thing, it's far from as simple as you think :) ->message is a string, yes, but there's also a method by that name (in Base.php, IIRC). It all goes south in the vicinity of line 466 in Base.php. I'm forwarding it upstream.

Revision history for this message
Soren Hansen (soren) wrote :

Filed with the SOAP developers.

http://pear.php.net/bugs/bug.php?id=11968

Revision history for this message
johannes (j00hannes) wrote :

i would suggest everyone to stop working with pear-soap and use the build-in soap functions instead: http://php.net/manual/en/ref.soap.php

Revision history for this message
Colan Schwartz (colan) wrote :

Is there a way to deprecate the PEAR version now that we've got it in core PHP? I could see a lot of users installing php-soap not realizing that it's part of core. I actually didn't know until I did a bit of research. ;)

...or at least specifying this in the package description.

Revision history for this message
Soren Hansen (soren) wrote :

Bug fixed upstream:

    http://pear.php.net/bugs/bug.php?id=11968

The relevant patch is:

    http://cvs.php.net/viewvc.cgi/pear/SOAP/Fault.php?r1=1.25&r2=1.26&view=patch

Does anyone feel like preparing an updated package?

Revision history for this message
Chuck Short (zulcss) wrote :

This is fixed in natty, here is the updated URL for the patch:

http://svn.php.net/viewvc/pear/packages/SOAP/trunk/Fault.php?r1=243809&r2=262667

tags: added: bitesize server-sru-easy
Changed in php5 (Ubuntu):
status: Confirmed → Fix Released
Changed in php-soap (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.