Fix: security with multi-company
This commit is contained in:
parent
825f3346c9
commit
8b02eb1f3f
@ -34,17 +34,12 @@ $langs->load("products");
|
|||||||
$langs->load("bills");
|
$langs->load("bills");
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$id = '';
|
if (isset($_GET["id"]) || isset($_GET["ref"]))
|
||||||
if (isset($_GET["id"]))
|
|
||||||
{
|
{
|
||||||
$id = $_GET["id"];
|
$id = isset($_GET["id"])?$_GET["id"]:(isset($_GET["ref"])?$_GET["ref"]:'');
|
||||||
$fieldid = 'rowid';
|
$fieldid = isset($_REQUEST["ref"])?'ref':'rowid';
|
||||||
}
|
|
||||||
if (isset($_GET["ref"]))
|
|
||||||
{
|
|
||||||
$id = $_GET["ref"];
|
|
||||||
$fieldid = 'ref';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result=restrictedArea($user,'produit',$id,'product','','',$fieldid);
|
$result=restrictedArea($user,'produit',$id,'product','','',$fieldid);
|
||||||
|
|
||||||
|
|||||||
@ -39,17 +39,12 @@ $langs->load("products");
|
|||||||
$action=empty($_GET['action']) ? (empty($_POST['action']) ? '' : $_POST['action']) : $_GET['action'];
|
$action=empty($_GET['action']) ? (empty($_POST['action']) ? '' : $_POST['action']) : $_GET['action'];
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$id = '';
|
if (isset($_GET["id"]) || isset($_GET["ref"]))
|
||||||
if (isset($_GET["id"]))
|
|
||||||
{
|
{
|
||||||
$id = $_GET["id"];
|
$id = isset($_GET["id"])?$_GET["id"]:(isset($_GET["ref"])?$_GET["ref"]:'');
|
||||||
$fieldid = 'rowid';
|
$fieldid = isset($_REQUEST["ref"])?'ref':'rowid';
|
||||||
}
|
|
||||||
if (isset($_GET["ref"]))
|
|
||||||
{
|
|
||||||
$id = $_GET["ref"];
|
|
||||||
$fieldid = 'ref';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result=restrictedArea($user,'produit',$id,'product','','',$fieldid);
|
$result=restrictedArea($user,'produit',$id,'product','','',$fieldid);
|
||||||
|
|
||||||
|
|||||||
@ -41,17 +41,12 @@ $langs->load("other");
|
|||||||
$langs->load("stocks");
|
$langs->load("stocks");
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$id = '';
|
if (isset($_GET["id"]) || isset($_GET["ref"]))
|
||||||
if (isset($_GET["id"]))
|
|
||||||
{
|
{
|
||||||
$id = $_GET["id"];
|
$id = isset($_GET["id"])?$_GET["id"]:(isset($_GET["ref"])?$_GET["ref"]:'');
|
||||||
$fieldid = 'rowid';
|
$fieldid = isset($_REQUEST["ref"])?'ref':'rowid';
|
||||||
}
|
|
||||||
if (isset($_GET["ref"]))
|
|
||||||
{
|
|
||||||
$id = $_GET["ref"];
|
|
||||||
$fieldid = 'ref';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result=restrictedArea($user,'produit',$id,'product','','',$fieldid);
|
$result=restrictedArea($user,'produit',$id,'product','','',$fieldid);
|
||||||
|
|
||||||
|
|||||||
@ -36,17 +36,12 @@ $langs->load("suppliers");
|
|||||||
$langs->load("bills");
|
$langs->load("bills");
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$id = '';
|
if (isset($_GET["id"]) || isset($_GET["ref"]))
|
||||||
if (isset($_GET["id"]))
|
|
||||||
{
|
{
|
||||||
$id = $_GET["id"];
|
$id = isset($_GET["id"])?$_GET["id"]:(isset($_GET["ref"])?$_GET["ref"]:'');
|
||||||
$fieldid = 'rowid';
|
$fieldid = isset($_REQUEST["ref"])?'ref':'rowid';
|
||||||
}
|
|
||||||
if (isset($_GET["ref"]))
|
|
||||||
{
|
|
||||||
$id = $_GET["ref"];
|
|
||||||
$fieldid = 'ref';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result=restrictedArea($user,'produit',$id,'product','','',$fieldid);
|
$result=restrictedArea($user,'produit',$id,'product','','',$fieldid);
|
||||||
|
|
||||||
|
|||||||
@ -35,17 +35,12 @@ $langs->load("products");
|
|||||||
$langs->load("bills");
|
$langs->load("bills");
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$id = '';
|
if (isset($_GET["id"]) || isset($_GET["ref"]))
|
||||||
if (isset($_GET["id"]))
|
|
||||||
{
|
{
|
||||||
$id = $_GET["id"];
|
$id = isset($_GET["id"])?$_GET["id"]:(isset($_GET["ref"])?$_GET["ref"]:'');
|
||||||
$fieldid = 'rowid';
|
$fieldid = isset($_REQUEST["ref"])?'ref':'rowid';
|
||||||
}
|
|
||||||
if (isset($_GET["ref"]))
|
|
||||||
{
|
|
||||||
$id = $_GET["ref"];
|
|
||||||
$fieldid = 'ref';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result=restrictedArea($user,'produit',$id,'product','','',$fieldid);
|
$result=restrictedArea($user,'produit',$id,'product','','',$fieldid);
|
||||||
|
|
||||||
|
|||||||
@ -35,17 +35,12 @@ $langs->load("products");
|
|||||||
$langs->load("bills");
|
$langs->load("bills");
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$id = '';
|
if (isset($_GET["id"]) || isset($_GET["ref"]))
|
||||||
if (isset($_GET["id"]))
|
|
||||||
{
|
{
|
||||||
$id = $_GET["id"];
|
$id = isset($_GET["id"])?$_GET["id"]:(isset($_GET["ref"])?$_GET["ref"]:'');
|
||||||
$fieldid = 'rowid';
|
$fieldid = isset($_REQUEST["ref"])?'ref':'rowid';
|
||||||
}
|
|
||||||
if (isset($_GET["ref"]))
|
|
||||||
{
|
|
||||||
$id = $_GET["ref"];
|
|
||||||
$fieldid = 'ref';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result=restrictedArea($user,'produit',$id,'product','','',$fieldid);
|
$result=restrictedArea($user,'produit',$id,'product','','',$fieldid);
|
||||||
|
|
||||||
|
|||||||
@ -36,17 +36,12 @@ $langs->load("bills");
|
|||||||
$langs->load("products");
|
$langs->load("products");
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$id = '';
|
if (isset($_GET["id"]) || isset($_GET["ref"]))
|
||||||
if (isset($_GET["id"]))
|
|
||||||
{
|
{
|
||||||
$id = $_GET["id"];
|
$id = isset($_GET["id"])?$_GET["id"]:(isset($_GET["ref"])?$_GET["ref"]:'');
|
||||||
$fieldid = 'rowid';
|
$fieldid = isset($_REQUEST["ref"])?'ref':'rowid';
|
||||||
}
|
|
||||||
if (isset($_GET["ref"]))
|
|
||||||
{
|
|
||||||
$id = $_GET["ref"];
|
|
||||||
$fieldid = 'ref';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result=restrictedArea($user,'produit',$id,'product','','',$fieldid);
|
$result=restrictedArea($user,'produit',$id,'product','','',$fieldid);
|
||||||
|
|
||||||
|
|||||||
@ -36,17 +36,12 @@ $langs->load("products");
|
|||||||
$langs->load("companies");
|
$langs->load("companies");
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$id = '';
|
if (isset($_GET["id"]) || isset($_GET["ref"]))
|
||||||
if (isset($_GET["id"]))
|
|
||||||
{
|
{
|
||||||
$id = $_GET["id"];
|
$id = isset($_GET["id"])?$_GET["id"]:(isset($_GET["ref"])?$_GET["ref"]:'');
|
||||||
$fieldid = 'rowid';
|
$fieldid = isset($_REQUEST["ref"])?'ref':'rowid';
|
||||||
}
|
|
||||||
if (isset($_GET["ref"]))
|
|
||||||
{
|
|
||||||
$id = $_GET["ref"];
|
|
||||||
$fieldid = 'ref';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result=restrictedArea($user,'produit',$id,'product','','',$fieldid);
|
$result=restrictedArea($user,'produit',$id,'product','','',$fieldid);
|
||||||
|
|
||||||
|
|||||||
@ -36,17 +36,12 @@ $langs->load("products");
|
|||||||
$langs->load("companies");
|
$langs->load("companies");
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$id = '';
|
if (isset($_GET["id"]) || isset($_GET["ref"]))
|
||||||
if (isset($_GET["id"]))
|
|
||||||
{
|
{
|
||||||
$id = $_GET["id"];
|
$id = isset($_GET["id"])?$_GET["id"]:(isset($_GET["ref"])?$_GET["ref"]:'');
|
||||||
$fieldid = 'rowid';
|
$fieldid = isset($_REQUEST["ref"])?'ref':'rowid';
|
||||||
}
|
|
||||||
if (isset($_GET["ref"]))
|
|
||||||
{
|
|
||||||
$id = $_GET["ref"];
|
|
||||||
$fieldid = 'ref';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result=restrictedArea($user,'produit',$id,'product','','',$fieldid);
|
$result=restrictedArea($user,'produit',$id,'product','','',$fieldid);
|
||||||
|
|
||||||
|
|||||||
@ -35,17 +35,12 @@ $langs->load("products");
|
|||||||
$langs->load("companies");
|
$langs->load("companies");
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$id = '';
|
if (isset($_GET["id"]) || isset($_GET["ref"]))
|
||||||
if (isset($_GET["id"]))
|
|
||||||
{
|
{
|
||||||
$id = $_GET["id"];
|
$id = isset($_GET["id"])?$_GET["id"]:(isset($_GET["ref"])?$_GET["ref"]:'');
|
||||||
$fieldid = 'rowid';
|
$fieldid = isset($_REQUEST["ref"])?'ref':'rowid';
|
||||||
}
|
|
||||||
if (isset($_GET["ref"]))
|
|
||||||
{
|
|
||||||
$id = $_GET["ref"];
|
|
||||||
$fieldid = 'ref';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result=restrictedArea($user,'produit',$id,'product','','',$fieldid);
|
$result=restrictedArea($user,'produit',$id,'product','','',$fieldid);
|
||||||
|
|
||||||
|
|||||||
@ -36,17 +36,12 @@ $langs->load("bills");
|
|||||||
$langs->load("products");
|
$langs->load("products");
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$id = '';
|
if (isset($_GET["id"]) || isset($_GET["ref"]))
|
||||||
if (isset($_GET["id"]))
|
|
||||||
{
|
{
|
||||||
$id = $_GET["id"];
|
$id = isset($_GET["id"])?$_GET["id"]:(isset($_GET["ref"])?$_GET["ref"]:'');
|
||||||
$fieldid = 'rowid';
|
$fieldid = isset($_REQUEST["ref"])?'ref':'rowid';
|
||||||
}
|
|
||||||
if (isset($_GET["ref"]))
|
|
||||||
{
|
|
||||||
$id = $_GET["ref"];
|
|
||||||
$fieldid = 'ref';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result=restrictedArea($user,'produit',$id,'product','','',$fieldid);
|
$result=restrictedArea($user,'produit',$id,'product','','',$fieldid);
|
||||||
|
|
||||||
|
|||||||
@ -37,17 +37,12 @@ $langs->load("products");
|
|||||||
$langs->load("companies");
|
$langs->load("companies");
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$id = '';
|
if (isset($_GET["id"]) || isset($_GET["ref"]))
|
||||||
if (isset($_GET["id"]))
|
|
||||||
{
|
{
|
||||||
$id = $_GET["id"];
|
$id = isset($_GET["id"])?$_GET["id"]:(isset($_GET["ref"])?$_GET["ref"]:'');
|
||||||
$fieldid = 'rowid';
|
$fieldid = isset($_REQUEST["ref"])?'ref':'rowid';
|
||||||
}
|
|
||||||
if (isset($_GET["ref"]))
|
|
||||||
{
|
|
||||||
$id = $_GET["ref"];
|
|
||||||
$fieldid = 'ref';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result=restrictedArea($user,'produit',$id,'product','','',$fieldid);
|
$result=restrictedArea($user,'produit',$id,'product','','',$fieldid);
|
||||||
|
|
||||||
|
|||||||
@ -39,17 +39,12 @@ $langs->load("other");
|
|||||||
$mode=isset($_GET["mode"])?$_GET["mode"]:'byunit';
|
$mode=isset($_GET["mode"])?$_GET["mode"]:'byunit';
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$id = '';
|
if (isset($_GET["id"]) || isset($_GET["ref"]))
|
||||||
if (isset($_GET["id"]))
|
|
||||||
{
|
{
|
||||||
$id = $_GET["id"];
|
$id = isset($_GET["id"])?$_GET["id"]:(isset($_GET["ref"])?$_GET["ref"]:'');
|
||||||
$fieldid = 'rowid';
|
$fieldid = isset($_REQUEST["ref"])?'ref':'rowid';
|
||||||
}
|
|
||||||
if (isset($_GET["ref"]))
|
|
||||||
{
|
|
||||||
$id = $_GET["ref"];
|
|
||||||
$fieldid = 'ref';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result=restrictedArea($user,'produit',$id,'product','','',$fieldid);
|
$result=restrictedArea($user,'produit',$id,'product','','',$fieldid);
|
||||||
|
|
||||||
|
|||||||
@ -35,17 +35,12 @@ $langs->load("products");
|
|||||||
$langs->load("companies");
|
$langs->load("companies");
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$id = '';
|
if (isset($_GET["id"]) || isset($_GET["ref"]))
|
||||||
if (isset($_GET["id"]))
|
|
||||||
{
|
{
|
||||||
$id = $_GET["id"];
|
$id = isset($_GET["id"])?$_GET["id"]:(isset($_GET["ref"])?$_GET["ref"]:'');
|
||||||
$fieldid = 'rowid';
|
$fieldid = isset($_REQUEST["ref"])?'ref':'rowid';
|
||||||
}
|
|
||||||
if (isset($_GET["ref"]))
|
|
||||||
{
|
|
||||||
$id = $_GET["ref"];
|
|
||||||
$fieldid = 'ref';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result=restrictedArea($user,'produit',$id,'product','','',$fieldid);
|
$result=restrictedArea($user,'produit',$id,'product','','',$fieldid);
|
||||||
|
|
||||||
|
|||||||
@ -37,17 +37,12 @@ $langs->load("orders");
|
|||||||
$langs->load("bills");
|
$langs->load("bills");
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$id = '';
|
if (isset($_GET["id"]) || isset($_GET["ref"]))
|
||||||
if (isset($_GET["id"]))
|
|
||||||
{
|
{
|
||||||
$id = $_GET["id"];
|
$id = isset($_GET["id"])?$_GET["id"]:(isset($_GET["ref"])?$_GET["ref"]:'');
|
||||||
$fieldid = 'rowid';
|
$fieldid = isset($_REQUEST["ref"])?'ref':'rowid';
|
||||||
}
|
|
||||||
if (isset($_GET["ref"]))
|
|
||||||
{
|
|
||||||
$id = $_GET["ref"];
|
|
||||||
$fieldid = 'ref';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result=restrictedArea($user,'produit',$id,'product','','',$fieldid);
|
$result=restrictedArea($user,'produit',$id,'product','','',$fieldid);
|
||||||
|
|
||||||
|
|||||||
@ -36,17 +36,12 @@ $langs->load("products");
|
|||||||
$langs->load("bills");
|
$langs->load("bills");
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$id = '';
|
if (isset($_GET["id"]) || isset($_GET["ref"]))
|
||||||
if (isset($_GET["id"]))
|
|
||||||
{
|
{
|
||||||
$id = $_GET["id"];
|
$id = isset($_GET["id"])?$_GET["id"]:(isset($_GET["ref"])?$_GET["ref"]:'');
|
||||||
$fieldid = 'rowid';
|
$fieldid = isset($_REQUEST["ref"])?'ref':'rowid';
|
||||||
}
|
|
||||||
if (isset($_GET["ref"]))
|
|
||||||
{
|
|
||||||
$id = $_GET["ref"];
|
|
||||||
$fieldid = 'ref';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result=restrictedArea($user,'produit',$id,'product','','',$fieldid);
|
$result=restrictedArea($user,'produit',$id,'product','','',$fieldid);
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user