From 5351b5b315c2fbd74a8e188696008e6d10809670 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Lombra=C3=B1a=20Gonz=C3=A1lez?= Date: Thu, 14 Jul 2011 11:01:43 +0200 Subject: [PATCH] Fixed CDATA opaque parse problem. The opaque data is surrounded by a CDATA tag that was ignored by the RPC causing to not authenticate the host and create a new entry in the DB each time a RPC was issued by the client. This commit fixes the problem, requiring to have at least a BOINC 6.10.x version. --- conf/jarifa.conf | 2 +- rpc.php | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/conf/jarifa.conf b/conf/jarifa.conf index 32f8ca3..36d132b 100644 --- a/conf/jarifa.conf +++ b/conf/jarifa.conf @@ -27,7 +27,7 @@ jarifa@unex.es jarifa jarifa - 600 + 610 1 diff --git a/rpc.php b/rpc.php index f32314a..4d18e2b 100644 --- a/rpc.php +++ b/rpc.php @@ -22,7 +22,13 @@ $rpc = new rpc; -$host = simplexml_load_file("php://input"); +$host = simplexml_load_file("php://input",'SimpleXMLElement',LIBXML_NOCDATA); + +// Update content as it is surrounded by CDATA: + +$host->opaque->addChild('id',''); +$host->opaque->id = simplexml_load_string($host->opaque, 'SimpleXMLElement',LIBXML_NOCDATA); + if ($rpc->auth($host)) {