Fix: use cookie for external app
This commit is contained in:
parent
51c94f7c7e
commit
df850433e2
@ -362,16 +362,16 @@ if (! defined('NOLOGIN'))
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$usertotest=$_POST["username"];
|
$usertotest = (! empty($_COOKIE['login_dolibarr']) ? $_COOKIE['login_dolibarr'] : $_POST["username"]);
|
||||||
$passwordtotest=$_POST["password"];
|
$passwordtotest = (! empty($_COOKIE['password_dolibarr']) ? $_COOKIE['password_dolibarr'] : $_POST["password"]);
|
||||||
$entitytotest=$_POST["entity"];
|
$entitytotest = (! empty($_POST["entity"]) ? $_POST["entity"] : 1);
|
||||||
|
|
||||||
// Validation of login/pass/entity
|
// Validation of login/pass/entity
|
||||||
// If ok, the variable login will be returned
|
// If ok, the variable login will be returned
|
||||||
// If error, we will put error message in session under the name dol_loginmesg
|
// If error, we will put error message in session under the name dol_loginmesg
|
||||||
$goontestloop=false;
|
$goontestloop=false;
|
||||||
if (isset($_SERVER["REMOTE_USER"]) && in_array('http',$authmode)) $goontestloop=true;
|
if (isset($_SERVER["REMOTE_USER"]) && in_array('http',$authmode)) $goontestloop=true;
|
||||||
if (isset($_POST["username"]) || GETPOST('openid_mode','alpha',1)) $goontestloop=true;
|
if (isset($_POST["username"]) || ! empty($_COOKIE['login_dolibarr']) || GETPOST('openid_mode','alpha',1)) $goontestloop=true;
|
||||||
|
|
||||||
if ($test && $goontestloop)
|
if ($test && $goontestloop)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user