Download & Extend

replacing all method names causes a bug if a valid method name appears anywhere else in the request

Project:SOAP Server
Version:6.x-1.2-beta1
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

The code does

<?php
foreach (services_get_all() as $method) {
    
$HTTP_RAW_POST_DATA = str_replace($method['#method'], 'soap_call_wrapper', $HTTP_RAW_POST_DATA);
//do more stuff
}
?>

So if a method name appears anywhere in the request it will be replaced.

This bug hit me because I had one method named pm.get and another pm.getThread

replacing pm.get with soap_call_wrapper meant the results was saop_call_wrapperThread

I think that the replacement needs to be stricter to only match on whole method names

nobody click here