Skip to content
Snippets Groups Projects
Commit 87099332 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Fix: Too much sanitizing

parent f8a9733b
No related branches found
No related tags found
No related merge requests found
......@@ -209,7 +209,8 @@ if ($action == 'set_COMMANDE_DRAFT_WATERMARK')
if ($action == 'set_COMMANDE_FREE_TEXT')
{
$freetext = GETPOST("COMMANDE_FREE_TEXT");
$freetext = GETPOST("COMMANDE_FREE_TEXT"); // No alpha here, we want exact string
$res = dolibarr_set_const($db, "COMMANDE_FREE_TEXT",$freetext,'chaine',0,'',$conf->entity);
if (! $res > 0) $error++;
......@@ -407,12 +408,12 @@ foreach ($dirmodels as $reldir)
}
closedir($handle);
arsort($filelist);
foreach($filelist as $file)
{
if (preg_match('/\.modules\.php$/i',$file) && preg_match('/^(pdf_|doc_)/',$file))
{
if (file_exists($dir.'/'.$file))
{
$name = substr($file, 4, dol_strlen($file) -16);
......
......@@ -254,9 +254,9 @@ if ($action == 'set_FACTURE_DRAFT_WATERMARK')
if ($action == 'set_FACTURE_FREE_TEXT')
{
$free = GETPOST('FACTURE_FREE_TEXT','alpha');
$freetext = GETPOST('FACTURE_FREE_TEXT'); // No alpha here, we want exact string
$res = dolibarr_set_const($db, "FACTURE_FREE_TEXT",$free,'chaine',0,'',$conf->entity);
$res = dolibarr_set_const($db, "FACTURE_FREE_TEXT",$freetext,'chaine',0,'',$conf->entity);
if (! $res > 0) $error++;
......
......@@ -250,8 +250,9 @@ if ($action == 'addcat')
if ($action == 'set_SUPPLIER_INVOICE_FREE_TEXT')
{
$free = GETPOST('SUPPLIER_INVOICE_FREE_TEXT','alpha');
$res = dolibarr_set_const($db, "SUPPLIER_INVOICE_FREE_TEXT",$free,'chaine',0,'',$conf->entity);
$freetext = GETPOST('SUPPLIER_INVOICE_FREE_TEXT'); // No alpha here, we want exact string
$res = dolibarr_set_const($db, "SUPPLIER_INVOICE_FREE_TEXT",$freetext,'chaine',0,'',$conf->entity);
if (! $res > 0) $error++;
......
......@@ -130,7 +130,7 @@ if ($action == 'set_PROPALE_DRAFT_WATERMARK')
if ($action == 'set_PROPALE_FREE_TEXT')
{
$freetext = GETPOST('PROPALE_FREE_TEXT','alpha');
$freetext = GETPOST('PROPALE_FREE_TEXT'); // No alpha here, we want exact string
$res = dolibarr_set_const($db, "PROPALE_FREE_TEXT",$freetext,'chaine',0,'',$conf->entity);
......
......@@ -45,8 +45,9 @@ $action = GETPOST('action','alpha');
if ($action == 'set_BANK_CHEQUERECEIPT_FREE_TEXT')
{
$free = GETPOST('BANK_CHEQUERECEIPT_FREE_TEXT','alpha');
$res = dolibarr_set_const($db, "BANK_CHEQUERECEIPT_FREE_TEXT",$free,'chaine',0,'',$conf->entity);
$freetext = GETPOST('BANK_CHEQUERECEIPT_FREE_TEXT'); // No alpha here, we want exact string
$res = dolibarr_set_const($db, "BANK_CHEQUERECEIPT_FREE_TEXT",$freetext,'chaine',0,'',$conf->entity);
if (! $res > 0) $error++;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment