X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;ds=sidebyside;f=demo%2Fserver%2Fproxy.php;h=adf80041bd9f1ccdcde57f4311280fd3d9282095;hb=70b5a85b3f6831d37e34a7b86bf87383247f16bb;hp=4f860de187d3d95e047c10c9f2715ce6d088793d;hpb=92e61c97411b8652b235e9c05d64934d83c53671;p=plcapi.git diff --git a/demo/server/proxy.php b/demo/server/proxy.php index 4f860de..adf8004 100644 --- a/demo/server/proxy.php +++ b/demo/server/proxy.php @@ -15,6 +15,8 @@ PhpXmlRpc\Autoloader::register(); /** * Forward an xmlrpc request to another server, and return to client the response received. * + * DO NOT RUN AS IS IN PRODUCTION - this is an open relay !!! + * * @param PhpXmlRpc\Request $req (see method docs below for a description of the expected parameters) * * @return PhpXmlRpc\Response @@ -58,9 +60,9 @@ function forward_request($req) /// @todo find a way to forward client info (such as IP) to server, either /// - as xml comments in the payload, or /// - using std http header conventions, such as X-forwarded-for... - $reqethod = $encoder->decode($req->getParam(1)); + $reqMethod = $encoder->decode($req->getParam(1)); $pars = $req->getParam(2); - $req = new PhpXmlRpc\Request($reqethod); + $req = new PhpXmlRpc\Request($reqMethod); for ($i = 0; $i < $pars->arraySize(); $i++) { $req->addParam($pars->arraymem($i)); }