diff --git a/htdocs/core/get_info.php b/htdocs/core/get_info.php index d5e79f21e01..067372c26ff 100644 --- a/htdocs/core/get_info.php +++ b/htdocs/core/get_info.php @@ -33,7 +33,7 @@ if (!defined('NOCSRFCHECK')) { if (!defined('NOTOKENRENEWAL')) { define('NOTOKENRENEWAL', 1); } -//if (! defined('NOLOGIN')) define('NOLOGIN',1); // Not disabled cause need to load personalized language +//if (! defined('NOLOGIN')) define('NOLOGIN',1); // Not disabled cause need to load personalized language and need security layer if (!defined('NOREQUIREMENU')) { define('NOREQUIREMENU', 1); } @@ -56,8 +56,8 @@ $left = ($langs->trans("DIRECTION") == 'rtl' ? 'right' : 'left'); $title = $langs->trans("Info"); -// URL http://mydolibarr/core/search_page?dol_use_jmobile=1 can be used for tests -$head = ''."\n"; +// URL http://mydolibarr/core/get_info.php?dol_use_jmobile=1 can be used for tests +$head = ''."\n"; $arrayofjs = array(); $arrayofcss = array(); top_htmlhead($head, $title, 0, 0, $arrayofjs, $arrayofcss); @@ -93,7 +93,7 @@ if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { if ($_SESSION["dol_authmode"] != 'forceuser' && $_SESSION["dol_authmode"] != 'http') { $logouthtmltext .= $langs->trans("Logout").'
'; - $logouttext .= ''; + $logouttext .= ''; //$logouttext .= img_picto($langs->trans('Logout').":".$langs->trans('Logout'), 'logout_top.png', 'class="login"', 0, 0, 1); $logouttext .= ''; $logouttext .= ''; diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index acd2239e07f..56f1ce83a72 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -320,7 +320,7 @@ if (!empty($conf->global->MAIN_ONLY_LOGIN_ALLOWED)) { if (session_id() && isset($_SESSION["dol_login"]) && $_SESSION["dol_login"] != $conf->global->MAIN_ONLY_LOGIN_ALLOWED) { print 'Sorry, your application is offline.'."\n"; print 'You are logged with user "'.$_SESSION["dol_login"].'" and only administrator user "'.$conf->global->MAIN_ONLY_LOGIN_ALLOWED.'" is allowed to connect for the moment.'."\n"; - $nexturl = DOL_URL_ROOT.'/user/logout.php'; + $nexturl = DOL_URL_ROOT.'/user/logout.php?token='.newToken(); print 'Please try later or click here to disconnect and change login user...'."\n"; } else { print 'Sorry, your application is offline. Only administrator user "'.$conf->global->MAIN_ONLY_LOGIN_ALLOWED.'" is allowed to connect for the moment.'."\n"; @@ -1854,7 +1854,7 @@ function top_menu($head, $title = '', $target = '', $disablejs = 0, $disablehead if ($_SESSION["dol_authmode"] != 'forceuser' && $_SESSION["dol_authmode"] != 'http') { $logouthtmltext .= $langs->trans("Logout").'
'; - $logouttext .= ''; + $logouttext .= ''; $logouttext .= img_picto($langs->trans('Logout'), 'sign-out', '', false, 0, 0, '', 'atoplogin'); $logouttext .= ''; } else { @@ -2020,7 +2020,7 @@ function top_menu($head, $title = '', $target = '', $disablejs = 0, $disablehead * Build the tooltip on user login * * @param int $hideloginname Hide login name. Show only the image. - * @param string $urllogout URL for logout + * @param string $urllogout URL for logout (Will use DOL_URL_ROOT.'/user/logout.php?token=...' if empty) * @return string HTML content */ function top_menu_user($hideloginname = 0, $urllogout = '') @@ -2136,7 +2136,7 @@ function top_menu_user($hideloginname = 0, $urllogout = '') } if (empty($urllogout)) { - $urllogout = DOL_URL_ROOT.'/user/logout.php'; + $urllogout = DOL_URL_ROOT.'/user/logout.php?token='.newToken(); } $logoutLink = ' '.$langs->trans("Logout").''; $profilLink = ' '.$langs->trans("Card").''; diff --git a/htdocs/takepos/index.php b/htdocs/takepos/index.php index 2b4712e66cd..2c44acdaae2 100644 --- a/htdocs/takepos/index.php +++ b/htdocs/takepos/index.php @@ -906,7 +906,7 @@ if (empty($conf->global->TAKEPOS_HIDE_HEAD_BAR)) {
@@ -1163,7 +1163,7 @@ if ($r % 3 == 2) { } if (!empty($conf->global->TAKEPOS_HIDE_HEAD_BAR)) { - $menus[$r++] = array('title'=>'
'.$langs->trans("Logout").'
', 'action'=>'window.location.href=\''.DOL_URL_ROOT.'/user/logout.php\';'); + $menus[$r++] = array('title'=>'
'.$langs->trans("Logout").'
', 'action'=>'window.location.href=\''.DOL_URL_ROOT.'/user/logout.php?token='.newToken().'\';'); } if (!empty($conf->global->TAKEPOS_WEIGHING_SCALE)) { diff --git a/htdocs/takepos/phone.php b/htdocs/takepos/phone.php index 2f533faf717..a79a31f9d30 100644 --- a/htdocs/takepos/phone.php +++ b/htdocs/takepos/phone.php @@ -329,7 +329,7 @@ function TakeposPrintingOrder(){ } function Exit(){ - window.location.href='../user/logout.php'; + window.location.href='../user/logout.php?token='; } function CheckPlease(payment){