Skip to content
Snippets Groups Projects
Commit becda06f authored by Regis Houssin's avatar Regis Houssin
Browse files

Fix: security

parent 40be4287
No related branches found
No related tags found
No related merge requests found
...@@ -44,12 +44,7 @@ $langs->load('bills'); ...@@ -44,12 +44,7 @@ $langs->load('bills');
$langs->load('orders'); $langs->load('orders');
$langs->load('products'); $langs->load('products');
$id=GETPOST('id','int');
$ref=GETPOST('ref','alpha');
$socid=GETPOST('socid','int'); $socid=GETPOST('socid','int');
$action=GETPOST('action','alpha');
$confirm=GETPOST('confirm','alpha');
$lineid=GETPOST('lineid','int');
$search_user=GETPOST('search_user','int'); $search_user=GETPOST('search_user','int');
$search_sale=GETPOST('search_sale','int'); $search_sale=GETPOST('search_sale','int');
...@@ -69,17 +64,14 @@ $NBLINES=4; ...@@ -69,17 +64,14 @@ $NBLINES=4;
// Security check // Security check
$module='propal'; $module='propal';
$dbtable=''; $dbtable='';
if (isset($socid)) $objectid='';
if (! empty($user->societe_id)) $socid=$user->societe_id;
if (! empty($socid))
{ {
$objectid=$socid; $objectid=$socid;
$module='societe'; $module='societe';
$dbtable='&societe'; $dbtable='&societe';
} }
else if (isset($id) && $id > 0)
{
$objectid=$id;
}
if ($user->societe_id) $socid=$user->societe_id;
$result = restrictedArea($user, $module, $objectid, $dbtable); $result = restrictedArea($user, $module, $objectid, $dbtable);
$object = new Propal($db); $object = new Propal($db);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment