Fix: better solution with new system
This commit is contained in:
parent
3b1874446c
commit
77f138710c
@ -72,18 +72,8 @@ function GETPOST($paramname,$check='',$method=0)
|
|||||||
*/
|
*/
|
||||||
function dol_getprefix()
|
function dol_getprefix()
|
||||||
{
|
{
|
||||||
// Add real path in session name
|
//print "prefix=".$_SERVER["SERVER_NAME"]."-".$_SERVER["DOCUMENT_ROOT"]."-".DOL_DOCUMENT_ROOT;
|
||||||
$realpath='';
|
return md5($_SERVER["SERVER_NAME"].$_SERVER["DOCUMENT_ROOT"].DOL_DOCUMENT_ROOT);
|
||||||
if (preg_match('/^([^.]+)\/htdocs\//i', realpath($_SERVER["SCRIPT_FILENAME"]), $regs)) $realpath = isset($regs[1])?$regs[1]:'';
|
|
||||||
if (defined('DOL_DOCUMENT_ROOT_ALT') && DOL_DOCUMENT_ROOT_ALT)
|
|
||||||
{
|
|
||||||
$realpath='';
|
|
||||||
// Warning, using alt feature is a security hole because path is not in session name, so being authenticated into an instance allow access on another
|
|
||||||
// FIXME The fix is to use only "root url" like the one defined into $dolibarr_main_url_root
|
|
||||||
}
|
|
||||||
//print "x".$realpath."-".$_SERVER["SERVER_NAME"].$_SERVER["DOCUMENT_ROOT"]."-".md5($_SERVER["SERVER_NAME"].$_SERVER["DOCUMENT_ROOT"]);
|
|
||||||
//return md5($_SERVER["SERVER_NAME"].$_SERVER["DOCUMENT_ROOT"].$realpath);
|
|
||||||
return md5($_SERVER["SERVER_NAME"].$_SERVER["DOCUMENT_ROOT"].$realpath);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user