Merge branch 'develop' of git+ssh://git@github.com/Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
3f72a4b12a
@ -38,7 +38,6 @@ $action = GETPOST('action','alpha');
|
|||||||
$cancel = GETPOST('cancel','alpha');
|
$cancel = GETPOST('cancel','alpha');
|
||||||
$origin = GETPOST('origin','alpha');
|
$origin = GETPOST('origin','alpha');
|
||||||
$catorigin = GETPOST('catorigin','int');
|
$catorigin = GETPOST('catorigin','int');
|
||||||
$nbcats = (GETPOST('choix') ? GETPOST('choix') : 1); // TODO not use ?
|
|
||||||
$type = GETPOST('type','alpha');
|
$type = GETPOST('type','alpha');
|
||||||
$urlfrom = GETPOST('urlfrom','alpha');
|
$urlfrom = GETPOST('urlfrom','alpha');
|
||||||
|
|
||||||
|
|||||||
@ -249,18 +249,20 @@ function GETPOST($paramname,$check='',$method=0)
|
|||||||
elseif ($method==1) $out = isset($_GET[$paramname])?$_GET[$paramname]:'';
|
elseif ($method==1) $out = isset($_GET[$paramname])?$_GET[$paramname]:'';
|
||||||
elseif ($method==2) $out = isset($_POST[$paramname])?$_POST[$paramname]:'';
|
elseif ($method==2) $out = isset($_POST[$paramname])?$_POST[$paramname]:'';
|
||||||
elseif ($method==3) $out = isset($_POST[$paramname])?$_POST[$paramname]:(isset($_GET[$paramname])?$_GET[$paramname]:'');
|
elseif ($method==3) $out = isset($_POST[$paramname])?$_POST[$paramname]:(isset($_GET[$paramname])?$_GET[$paramname]:'');
|
||||||
|
else return 'BadParameter';
|
||||||
|
|
||||||
if (! empty($check))
|
if (! empty($check))
|
||||||
{
|
{
|
||||||
|
$out=trim($out);
|
||||||
// Check if numeric
|
// Check if numeric
|
||||||
if ($check == 'int' && ! preg_match('/^[-\.,0-9]+$/i',trim($out))) $out='';
|
if ($check == 'int' && ! preg_match('/^[-\.,0-9]+$/i',$out)) $out='';
|
||||||
// Check if alpha
|
// Check if alpha
|
||||||
//if ($check == 'alpha' && ! preg_match('/^[ =:@#\/\\\(\)\-\._a-z0-9]+$/i',trim($out))) $out='';
|
elseif ($check == 'alpha')
|
||||||
// '"' is dangerous because param in url can close the href= or src= and add javascript functions.
|
|
||||||
if ($check == 'alpha')
|
|
||||||
{
|
{
|
||||||
if (preg_match('/"/',trim($out))) $out='';
|
// '"' is dangerous because param in url can close the href= or src= and add javascript functions.
|
||||||
else if (preg_match('/(\.\.\/)+/',trim($out))) $out='';
|
// '../' is dangerous because it allows dir transversals
|
||||||
|
if (preg_match('/"/',$out)) $out='';
|
||||||
|
else if (preg_match('/\.\.\//',$out)) $out='';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -142,4 +142,8 @@ AllAccounts=Tots els comptes bancaris/de caixa
|
|||||||
BackToAccount=Tornar al compte
|
BackToAccount=Tornar al compte
|
||||||
ShowAllAccounts=Mostra per a tots els comptes
|
ShowAllAccounts=Mostra per a tots els comptes
|
||||||
FutureTransaction=Transacció futura. No és possible conciliar.
|
FutureTransaction=Transacció futura. No és possible conciliar.
|
||||||
SelectChequeTransactionAndGenerate=Seleccioneu/filtreu els xecs a incloure a la remesa i feu clic a "Crear".
|
SelectChequeTransactionAndGenerate=Seleccioneu/filtreu els xecs a incloure a la remesa i feu clic a "Crear".
|
||||||
|
InputReceiptNumber=Indiqui l'extracte bancari relacionat amb la conciliació. Utilitzeu un valor numèric ordenable (per exemple, AAAAMM)
|
||||||
|
EventualyAddCategory=Eventualment, indiqui una categoria en la qual classificar els registres
|
||||||
|
ToConciliate=A conciliar?
|
||||||
|
ThenCheckLinesAndConciliate=A continuació, comproveu les línies presents en l'extracte bancari i feu clic
|
||||||
@ -115,6 +115,12 @@ ProfId2BE=-
|
|||||||
ProfId3BE=-
|
ProfId3BE=-
|
||||||
ProfId4BE=-
|
ProfId4BE=-
|
||||||
ProfId5BE=-
|
ProfId5BE=-
|
||||||
|
#ProfId1BR=CNAE
|
||||||
|
#ProfId2BR=CNPJ
|
||||||
|
#ProfId3BR=CPF
|
||||||
|
#ProfId4BR=INSS
|
||||||
|
#ProfId5BR=IE
|
||||||
|
#ProfId6BR=IM
|
||||||
ProfId1CH=-
|
ProfId1CH=-
|
||||||
ProfId2CH=-
|
ProfId2CH=-
|
||||||
ProfId3CH=Número federat
|
ProfId3CH=Número federat
|
||||||
|
|||||||
@ -104,6 +104,7 @@ ErrorBadValueForCode=Valor no vàlid per al codi. Torneu a intentar-ho amb un no
|
|||||||
ErrorBothFieldCantBeNegative=Els camps %s i %s no poden ser negatius
|
ErrorBothFieldCantBeNegative=Els camps %s i %s no poden ser negatius
|
||||||
ErrorNoActivatedBarcode=Cap tipus de codi de barres activat
|
ErrorNoActivatedBarcode=Cap tipus de codi de barres activat
|
||||||
ErrorWebServerUserHasNotPermission=El compte d'execució del servidor web <b>%s</b> no disposa dels permisos per això
|
ErrorWebServerUserHasNotPermission=El compte d'execució del servidor web <b>%s</b> no disposa dels permisos per això
|
||||||
|
ErrorNoActivatedBarcode=No hi ha activat cap tipus de codi de barres
|
||||||
|
|
||||||
# Warnings
|
# Warnings
|
||||||
WarningSafeModeOnCheckExecDir=Atenció, està activada l'opció PHP <b>safe_mode</b>, la comanda ha d'estar dins d'un directori declarat dins del paràmetre php <b>safe_mode_exec_dir</b>.
|
WarningSafeModeOnCheckExecDir=Atenció, està activada l'opció PHP <b>safe_mode</b>, la comanda ha d'estar dins d'un directori declarat dins del paràmetre php <b>safe_mode_exec_dir</b>.
|
||||||
|
|||||||
@ -39,6 +39,7 @@ MailingStatusDraft=Esborrany
|
|||||||
MailingStatusValidated=Validat
|
MailingStatusValidated=Validat
|
||||||
MailingStatusApproved=Aprovat
|
MailingStatusApproved=Aprovat
|
||||||
MailingStatusSent=Enviat
|
MailingStatusSent=Enviat
|
||||||
|
MailingStatusRead=Llegit
|
||||||
MailingStatusSentPartialy=Enviat parcialment
|
MailingStatusSentPartialy=Enviat parcialment
|
||||||
MailingStatusSentCompletely=Enviat completament
|
MailingStatusSentCompletely=Enviat completament
|
||||||
MailingStatusError=Error
|
MailingStatusError=Error
|
||||||
|
|||||||
@ -175,7 +175,7 @@ Info=Log
|
|||||||
Family=Familia
|
Family=Familia
|
||||||
Description=Descripció
|
Description=Descripció
|
||||||
Designation=Descripción
|
Designation=Descripción
|
||||||
Action=Esdeveniment
|
Action=Acció
|
||||||
Model=Model
|
Model=Model
|
||||||
DefaultModel=Model per defecte
|
DefaultModel=Model per defecte
|
||||||
About=Sobre
|
About=Sobre
|
||||||
|
|||||||
@ -15,4 +15,5 @@ ThisIsTransactionId=Identificador de la transacció: <b>%s</b>
|
|||||||
PAYPAL_ADD_PAYMENT_URL=Afegir la url del pagament Paypal en enviar un document per e-mail
|
PAYPAL_ADD_PAYMENT_URL=Afegir la url del pagament Paypal en enviar un document per e-mail
|
||||||
PAYPAL_IPN_MAIL_ADDRESS=Adreça e-mail per les notificacions instantànies de pagament (IPN)
|
PAYPAL_IPN_MAIL_ADDRESS=Adreça e-mail per les notificacions instantànies de pagament (IPN)
|
||||||
PredefinedMailContentSendOrderWithPaypalLink=Us adjuntem la comanda __ORDERREF__\n\nPodeu fer clic a l'enllaç assegurança de sota per realitzar el seu pagament a través de PayPal\n\n%s\n\nCordialment\n\n
|
PredefinedMailContentSendOrderWithPaypalLink=Us adjuntem la comanda __ORDERREF__\n\nPodeu fer clic a l'enllaç assegurança de sota per realitzar el seu pagament a través de PayPal\n\n%s\n\nCordialment\n\n
|
||||||
PredefinedMailContentSendInvoiceWithPaypalLink=Us adjuntem la factura __FACREF__\n\nPodeu fer clic a l'enllaç assegurança de sota per realitzar el seu pagament a través de PayPal\n\n%s\n\nCordialment\n\n
|
PredefinedMailContentSendInvoiceWithPaypalLink=Us adjuntem la factura __FACREF__\n\nPodeu fer clic a l'enllaç assegurança de sota per realitzar el seu pagament a través de PayPal\n\n%s\n\nCordialment\n\n
|
||||||
|
YouAreCurrentlyInSandboxMode=Actualment es troba en mode "sandbox"
|
||||||
@ -142,4 +142,8 @@ AllAccounts=Todas las cuentas bancarias/de caja
|
|||||||
BackToAccount=Volver a la cuenta
|
BackToAccount=Volver a la cuenta
|
||||||
ShowAllAccounts=Mostrar para todas las cuentas
|
ShowAllAccounts=Mostrar para todas las cuentas
|
||||||
FutureTransaction=Transacción futura. No es posible conciliar.
|
FutureTransaction=Transacción futura. No es posible conciliar.
|
||||||
SelectChequeTransactionAndGenerate=Seleccione/filtre los cheques a incluir en la remesa y haga clic en "Crear".
|
SelectChequeTransactionAndGenerate=Seleccione/filtre los cheques a incluir en la remesa y haga clic en "Crear".
|
||||||
|
InputReceiptNumber=Indique el extracto bancario relacionado con la conciliación. Utilice un valor numérico ordenable (por ejemplo, AAAAMM)
|
||||||
|
EventualyAddCategory=Eventualmente, indique una categoría en la que clasificar los registros
|
||||||
|
ToConciliate=¿A conciliar?
|
||||||
|
ThenCheckLinesAndConciliate=A continuación, compruebe las líneas presentes en el extracto bancario y haga clic
|
||||||
@ -115,6 +115,12 @@ ProfId2BE=-
|
|||||||
ProfId3BE=-
|
ProfId3BE=-
|
||||||
ProfId4BE=-
|
ProfId4BE=-
|
||||||
ProfId5BE=-
|
ProfId5BE=-
|
||||||
|
#ProfId1BR=CNAE
|
||||||
|
#ProfId2BR=CNPJ
|
||||||
|
#ProfId3BR=CPF
|
||||||
|
#ProfId4BR=INSS
|
||||||
|
#ProfId5BR=IE
|
||||||
|
#ProfId6BR=IM
|
||||||
ProfId1CH=-
|
ProfId1CH=-
|
||||||
ProfId2CH=-
|
ProfId2CH=-
|
||||||
ProfId3CH=Número federado
|
ProfId3CH=Número federado
|
||||||
|
|||||||
@ -104,6 +104,7 @@ ErrorBadValueForCode=Valor incorrecto para el código. Vuelva a intentar con un
|
|||||||
ErrorBothFieldCantBeNegative=Los campos %s y %s no pueden ser negativos
|
ErrorBothFieldCantBeNegative=Los campos %s y %s no pueden ser negativos
|
||||||
ErrorNoActivatedBarcode=Ningún tipo de código de barra activado
|
ErrorNoActivatedBarcode=Ningún tipo de código de barra activado
|
||||||
ErrorWebServerUserHasNotPermission=La cuenta de ejecución del servidor web <b>%s</b> no dispone de los permisos para esto
|
ErrorWebServerUserHasNotPermission=La cuenta de ejecución del servidor web <b>%s</b> no dispone de los permisos para esto
|
||||||
|
ErrorNoActivatedBarcode=No hay activado ningún tipo de código de barras
|
||||||
|
|
||||||
# Warnings
|
# Warnings
|
||||||
WarningSafeModeOnCheckExecDir=Atención, está activada la opción PHP <b>safe_mode</b>, el comando deberá estar dentro de un directorio declarado dentro del parámetro php <b>safe_mode_exec_dir</b>.
|
WarningSafeModeOnCheckExecDir=Atención, está activada la opción PHP <b>safe_mode</b>, el comando deberá estar dentro de un directorio declarado dentro del parámetro php <b>safe_mode_exec_dir</b>.
|
||||||
|
|||||||
@ -39,6 +39,7 @@ MailingStatusDraft=Borrador
|
|||||||
MailingStatusValidated=Validado
|
MailingStatusValidated=Validado
|
||||||
MailingStatusApproved=Aprovado
|
MailingStatusApproved=Aprovado
|
||||||
MailingStatusSent=Enviado
|
MailingStatusSent=Enviado
|
||||||
|
MailingStatusRead=Leido
|
||||||
MailingStatusSentPartialy=Enviado parcialmente
|
MailingStatusSentPartialy=Enviado parcialmente
|
||||||
MailingStatusSentCompletely=Enviado completamente
|
MailingStatusSentCompletely=Enviado completamente
|
||||||
MailingStatusError=Error
|
MailingStatusError=Error
|
||||||
|
|||||||
@ -175,7 +175,7 @@ Info=Log
|
|||||||
Family=Familia
|
Family=Familia
|
||||||
Description=Descripción
|
Description=Descripción
|
||||||
Designation=Descripción
|
Designation=Descripción
|
||||||
Action=Evento
|
Action=Acción
|
||||||
Model=Modelo
|
Model=Modelo
|
||||||
DefaultModel=Modelo por defecto
|
DefaultModel=Modelo por defecto
|
||||||
About=Acerca de
|
About=Acerca de
|
||||||
|
|||||||
@ -15,4 +15,5 @@ ThisIsTransactionId=Identificador de la transacción: <b>%s</b>
|
|||||||
PAYPAL_ADD_PAYMENT_URL=Añadir la url del pago Paypal al enviar un documento por e-mail
|
PAYPAL_ADD_PAYMENT_URL=Añadir la url del pago Paypal al enviar un documento por e-mail
|
||||||
PAYPAL_IPN_MAIL_ADDRESS=Dirección e-mail para las notificaciones instantáneas de pago (IPN)
|
PAYPAL_IPN_MAIL_ADDRESS=Dirección e-mail para las notificaciones instantáneas de pago (IPN)
|
||||||
PredefinedMailContentSendOrderWithPaypalLink=Le adjuntamos el pedido __ORDERREF__\n\nPuede hacer clic en el enlace seguro de abajo para realizar su pago a través de PayPal\n\n%s\n\nCordialmente\n\n
|
PredefinedMailContentSendOrderWithPaypalLink=Le adjuntamos el pedido __ORDERREF__\n\nPuede hacer clic en el enlace seguro de abajo para realizar su pago a través de PayPal\n\n%s\n\nCordialmente\n\n
|
||||||
PredefinedMailContentSendInvoiceWithPaypalLink=Le adjuntamos la factura __FACREF__\n\nPuede hacer clic en el enlace seguro de abajo para realizar su pago a través de PayPal\n\n%s\n\nCordialmente\n\n
|
PredefinedMailContentSendInvoiceWithPaypalLink=Le adjuntamos la factura __FACREF__\n\nPuede hacer clic en el enlace seguro de abajo para realizar su pago a través de PayPal\n\n%s\n\nCordialmente\n\n
|
||||||
|
YouAreCurrentlyInSandboxMode=Actualmente se encuentra en modo "sandbox"
|
||||||
@ -144,6 +144,7 @@ class SecurityTest extends PHPUnit_Framework_TestCase
|
|||||||
$_POST["param1"]="333";
|
$_POST["param1"]="333";
|
||||||
$_GET["param2"]='a/b#e(pr)qq-rr\cc';
|
$_GET["param2"]='a/b#e(pr)qq-rr\cc';
|
||||||
$_GET["param3"]='"a/b#e(pr)qq-rr\cc'; // Same than param2 + "
|
$_GET["param3"]='"a/b#e(pr)qq-rr\cc'; // Same than param2 + "
|
||||||
|
$_GET["param4"]='../dir';
|
||||||
|
|
||||||
$result=GETPOST('id','int'); // Must return nothing
|
$result=GETPOST('id','int'); // Must return nothing
|
||||||
print __METHOD__." result=".$result."\n";
|
print __METHOD__." result=".$result."\n";
|
||||||
@ -161,11 +162,15 @@ class SecurityTest extends PHPUnit_Framework_TestCase
|
|||||||
print __METHOD__." result=".$result."\n";
|
print __METHOD__." result=".$result."\n";
|
||||||
$this->assertEquals($result,$_GET["param2"]);
|
$this->assertEquals($result,$_GET["param2"]);
|
||||||
|
|
||||||
$result=GETPOST("param3",'alpha'); // Must return '' as there is a forbidden char
|
$result=GETPOST("param3",'alpha'); // Must return '' as there is a forbidden char "
|
||||||
print __METHOD__." result=".$result."\n";
|
print __METHOD__." result=".$result."\n";
|
||||||
$this->assertEquals($result,'');
|
$this->assertEquals($result,'');
|
||||||
|
|
||||||
return $result;
|
$result=GETPOST("param4",'alpha'); // Must return '' as there is a forbidden char ../
|
||||||
|
print __METHOD__." result=".$result."\n";
|
||||||
|
$this->assertEquals($result,'');
|
||||||
|
|
||||||
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user