From 0e820d4c2b627766a6d6c064b5345a459ff7346f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 24 Sep 2020 13:00:56 +0200 Subject: [PATCH] FIX link to home in takepos --- htdocs/main.inc.php | 7 ++++++- htdocs/takepos/index.php | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 0c51c153220..ce0af2bfd67 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -623,7 +623,12 @@ if (!defined('NOLOGIN')) // No data to test login, so we show the login page. dol_syslog("--- Access to ".$_SERVER["PHP_SELF"]." - action=".GETPOST('action', 'aZ09')." - actionlogin=".GETPOST('actionlogin', 'aZ09')." - showing the login form and exit"); if (defined('NOREDIRECTBYMAINTOLOGIN')) return 'ERROR_NOT_LOGGED'; - else dol_loginfunction($langs, $conf, (!empty($mysoc) ? $mysoc : '')); + else { + if ($_SERVER["HTTP_USER_AGENT"] == 'securitytest') { + http_response_code(401); // It makes easier to understand if session was broken during security tests + } + dol_loginfunction($langs, $conf, (!empty($mysoc) ? $mysoc : '')); + } exit; } diff --git a/htdocs/takepos/index.php b/htdocs/takepos/index.php index c29f74a53fd..73b039d97e9 100644 --- a/htdocs/takepos/index.php +++ b/htdocs/takepos/index.php @@ -836,7 +836,7 @@ if (empty($conf->global->TAKEPOS_HIDE_HEAD_BAR)) {
" autofocus> - + dol_use_jmobile)) { ?>