Fix: la fonction AES_ENCRYPT ne doit pas tre entre quote et le addslashes doit se faire sur la valeur et pas sur la totalit de la fonction
This commit is contained in:
parent
dc7de74cac
commit
8d887ea819
@ -390,8 +390,8 @@ function dolibarr_set_const($db, $name, $value, $type='chaine', $visible=0, $not
|
||||
{
|
||||
$sql = "INSERT INTO llx_const(name,value,type,visible,note,entity)";
|
||||
$sql.= " VALUES (";
|
||||
$sql.= "'".addslashes($db->encrypt($name,$conf->db->dolibarr_main_db_encryption,$conf->db->dolibarr_main_db_cryptkey,0))."'";
|
||||
$sql.= ",'".addslashes($db->encrypt($value,$conf->db->dolibarr_main_db_encryption,$conf->db->dolibarr_main_db_cryptkey,0))."'";
|
||||
$sql.= $db->encrypt($name,$conf->db->dolibarr_main_db_encryption,$conf->db->dolibarr_main_db_cryptkey,1);
|
||||
$sql.= ", ".$db->encrypt($value,$conf->db->dolibarr_main_db_encryption,$conf->db->dolibarr_main_db_cryptkey,1);
|
||||
$sql.= ",'".$type."',".$visible.",'".addslashes($note)."',".$entity.")";
|
||||
|
||||
dol_syslog("admin.lib::dolibarr_set_const sql=".$sql, LOG_DEBUG);
|
||||
|
||||
@ -712,7 +712,7 @@ class DoliDb
|
||||
}
|
||||
}
|
||||
|
||||
return ($withQuotes?"'":"").$return.($withQuotes?"'":"");
|
||||
return $return;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
Reference in New Issue
Block a user