Skip to content

Commit

Permalink
Fixed CDATA opaque parse problem.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
teleyinex committed Jul 14, 2011
1 parent e57a5a7 commit 5351b5b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion conf/jarifa.conf
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<boinc_user_email>[email protected]</boinc_user_email> <!--BOINC user e-mail that you want to use for Jarifa (it could be an existing one)-->
<boinc_user_name>jarifa</boinc_user_name> <!--BOINC user name that you want to use for Jarifa (it could be an existing one)-->
<boinc_passwd>jarifa</boinc_passwd> <!--BOINC password that you want to use for Jarifa (it could be an existing one)-->
<min_core_client_version>600</min_core_client_version> <!--Minimum BOINC core client version required for working with Jarifa. By default 6.0-->
<min_core_client_version>610</min_core_client_version> <!--Minimum BOINC core client version required for working with Jarifa. By default 6.0-->
<volunteer>1</volunteer> <!--Enables (1) or Disables (0) the Volunteer Role-->
</account_manager>
<gmap> <!--Google Maps integration. Add your country and a Google Map Key to enable this feature-->
Expand Down
8 changes: 7 additions & 1 deletion rpc.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,13 @@

$rpc = new rpc;

$host = simplexml_load_file("php://input");
$host = simplexml_load_file("php://input",'SimpleXMLElement',LIBXML_NOCDATA);

// Update <opaque><id></id></opaque> 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))
{
Expand Down

0 comments on commit 5351b5b

Please sign in to comment.