MDL-57775 xmlrpc: Pass escaping to xmlrpc_encode_request() calls
This patch adds the missing 'escaping' option to all remaining xmlrpc_encode_request() calls in the moodle core code. Without this, the xmlrpc_decode_request() call on the server side may lead to wrongly decoded non-ascii characters.
This commit is contained in:
+4
-1
@@ -56,7 +56,10 @@ function mnet_get_public_key($uri, $application=null) {
|
||||
$application = $DB->get_record('mnet_application', array('name'=>'moodle'));
|
||||
}
|
||||
|
||||
$rq = xmlrpc_encode_request('system/keyswap', array($CFG->wwwroot, $mnet->public_key, $application->name), array("encoding" => "utf-8"));
|
||||
$rq = xmlrpc_encode_request('system/keyswap', array($CFG->wwwroot, $mnet->public_key, $application->name), array(
|
||||
'encoding' => 'utf-8',
|
||||
'escaping' => 'markup',
|
||||
));
|
||||
$ch = curl_init($uri . $application->xmlrpc_server_url);
|
||||
|
||||
curl_setopt($ch, CURLOPT_TIMEOUT, 60);
|
||||
|
||||
@@ -75,7 +75,8 @@ class webservice_xmlrpc_client {
|
||||
|
||||
// Set output options.
|
||||
$outputoptions = array(
|
||||
'encoding' => 'utf-8'
|
||||
'encoding' => 'utf-8',
|
||||
'escaping' => 'markup',
|
||||
);
|
||||
|
||||
// Encode the request.
|
||||
|
||||
Reference in New Issue
Block a user