From cd4d04281bc7b6f4e7808d424fa2b26facc4adaf Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 23 Sep 2011 11:53:22 +0000 Subject: [PATCH] Sec: Fix security login mutualized function. --- htdocs/main.inc.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 0e2f6ee691f..3919bcffcde 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -155,6 +155,7 @@ require_once("master.inc.php"); register_shutdown_function('dol_shutdown'); // Detection browser +// TODO rename conf->browser into user->browser if (isset($_SERVER["HTTP_USER_AGENT"])) { // If phone/smartphone, we set phone os name. @@ -337,9 +338,10 @@ if (! defined('NOLOGIN')) // Verification security graphic code if (isset($_POST["username"]) && ! empty($conf->global->MAIN_SECURITY_ENABLECAPTCHA)) { - require_once(ARTICHOW_PATH.'Artichow.cfg.php'); - require_once(ARTICHOW.'/AntiSpam.class.php'); + require_once DOL_DOCUMENT_ROOT.'/includes/artichow/Artichow.cfg.php'; + require_once ARTICHOW."/AntiSpam.class.php"; + // It creates an anti-spam object $object = new AntiSpam(); // Verifie code