Conjunto de cambios 6627152 en sipes para cord/includes/xmlrpcs.inc


Ignorar:
Fecha y hora:
26/05/2016 19:22:55 (hace 8 años)
Autor:
José Gregorio Puentes <jpuentes@…>
Branches:
stable, version-3.0
Children:
a149f73
Parents:
52861f4
Mensaje:

se actualizo el cord

Fichero:
1 editado

Leyenda

No modificado
Añadido
Eliminado
  • cord/includes/xmlrpcs.inc

    rb354002 r6627152  
    214214function xmlrpc_server_multicall($methodcalls) {
    215215  // See http://www.xmlrpc.com/discuss/msgReader$1208
     216  // To avoid multicall expansion attacks, limit the number of duplicate method
     217  // calls allowed with a default of 1. Set to -1 for unlimited.
     218  $duplicate_method_limit = variable_get('xmlrpc_multicall_duplicate_method_limit', 1);
     219  $method_count = array();
    216220  $return = array();
    217221  $xmlrpc_server = xmlrpc_server_get();
     
    223227    }
    224228    $method = $call['methodName'];
     229    $method_count[$method] = isset($method_count[$method]) ? $method_count[$method] + 1 : 1;
    225230    $params = $call['params'];
    226231    if ($method == 'system.multicall') {
    227232      $result = xmlrpc_error(-32600, t('Recursive calls to system.multicall are forbidden.'));
     233    }
     234    elseif ($duplicate_method_limit > 0 && $method_count[$method] > $duplicate_method_limit) {
     235      $result = xmlrpc_error(-156579, t('Too many duplicate method calls in system.multicall.'));
    228236    }
    229237    elseif ($ok) {
Nota: Vea TracChangeset para ayuda en el uso del visor de conjuntos de cambios.