forked from Wavyzz/dolibarr
Fix log levels
This commit is contained in:
@@ -1344,7 +1344,7 @@ function dol_ucwords($string, $encoding = "UTF-8")
|
|||||||
* @param string $message Line to log. ''=Show nothing
|
* @param string $message Line to log. ''=Show nothing
|
||||||
* @param int $level Log level
|
* @param int $level Log level
|
||||||
* On Windows LOG_ERR=4, LOG_WARNING=5, LOG_NOTICE=LOG_INFO=6, LOG_DEBUG=6 si define_syslog_variables ou PHP 5.3+, 7 si dolibarr
|
* On Windows LOG_ERR=4, LOG_WARNING=5, LOG_NOTICE=LOG_INFO=6, LOG_DEBUG=6 si define_syslog_variables ou PHP 5.3+, 7 si dolibarr
|
||||||
* On Linux LOG_ERR=3, LOG_WARNING=4, LOG_INFO=6, LOG_DEBUG=7
|
* On Linux LOG_ERR=3, LOG_WARNING=4, LOG_NOTICE=5, LOG_INFO=6, LOG_DEBUG=7
|
||||||
* @param int $ident 1=Increase ident of 1, -1=Decrease ident of 1
|
* @param int $ident 1=Increase ident of 1, -1=Decrease ident of 1
|
||||||
* @param string $suffixinfilename When output is a file, append this suffix into default log filename.
|
* @param string $suffixinfilename When output is a file, append this suffix into default log filename.
|
||||||
* @param string $restricttologhandler Force output of log only to this log handler
|
* @param string $restricttologhandler Force output of log only to this log handler
|
||||||
|
|||||||
@@ -106,7 +106,7 @@ function check_user_password_dolibarr($usertotest, $passwordtotest, $entitytotes
|
|||||||
if ($cryptType == 'auto') {
|
if ($cryptType == 'auto') {
|
||||||
if (dol_verifyHash($passtyped, $passcrypted, '0')) {
|
if (dol_verifyHash($passtyped, $passcrypted, '0')) {
|
||||||
$passok = true;
|
$passok = true;
|
||||||
dol_syslog("functions_dolibarr::check_user_password_dolibarr Authentification ok - ".$cryptType." of pass is ok");
|
dol_syslog("functions_dolibarr::check_user_password_dolibarr Authentification ok - hash ".$cryptType." of pass is ok");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -462,7 +462,7 @@ if ((!defined('NOCSRFCHECK') && empty($dolibarr_nocsrfcheck) && !empty($conf->gl
|
|||||||
print $langs->trans("ErrorGoBackAndCorrectParameters");
|
print $langs->trans("ErrorGoBackAndCorrectParameters");
|
||||||
die;
|
die;
|
||||||
} else {
|
} else {
|
||||||
dol_syslog("--- Access to ".(empty($_SERVER["REQUEST_METHOD"])?'':$_SERVER["REQUEST_METHOD"].' ').$_SERVER["PHP_SELF"]." refused by CSRFCHECK_WITH_TOKEN protection. Token not provided.");
|
dol_syslog("--- Access to ".(empty($_SERVER["REQUEST_METHOD"])?'':$_SERVER["REQUEST_METHOD"].' ').$_SERVER["PHP_SELF"]." refused by CSRFCHECK_WITH_TOKEN protection. Token not provided.", LOG_WARNING);
|
||||||
if (defined('CSRFCHECK_WITH_TOKEN')) {
|
if (defined('CSRFCHECK_WITH_TOKEN')) {
|
||||||
print "Access to a page that needs a token (constant CSRFCHECK_WITH_TOKEN is defined) is refused by CSRF protection in main.inc.php. Token not provided.\n";
|
print "Access to a page that needs a token (constant CSRFCHECK_WITH_TOKEN is defined) is refused by CSRF protection in main.inc.php. Token not provided.\n";
|
||||||
} else {
|
} else {
|
||||||
@@ -742,7 +742,7 @@ if (!defined('NOLOGIN')) {
|
|||||||
// End test login / passwords
|
// End test login / passwords
|
||||||
if (!$login || (in_array('ldap', $authmode) && empty($passwordtotest))) { // With LDAP we refused empty password because some LDAP are "opened" for anonymous access so connexion is a success.
|
if (!$login || (in_array('ldap', $authmode) && empty($passwordtotest))) { // With LDAP we refused empty password because some LDAP are "opened" for anonymous access so connexion is a success.
|
||||||
// No data to test login, so we show the login page.
|
// No data to test login, so we show the login page.
|
||||||
dol_syslog("--- Access to ".(empty($_SERVER["REQUEST_METHOD"])?'':$_SERVER["REQUEST_METHOD"].' ').$_SERVER["PHP_SELF"]." - action=".GETPOST('action', 'aZ09')." - actionlogin=".GETPOST('actionlogin', 'aZ09')." - showing the login form and exit");
|
dol_syslog("--- Access to ".(empty($_SERVER["REQUEST_METHOD"])?'':$_SERVER["REQUEST_METHOD"].' ').$_SERVER["PHP_SELF"]." - action=".GETPOST('action', 'aZ09')." - actionlogin=".GETPOST('actionlogin', 'aZ09')." - showing the login form and exit", LOG_INFO);
|
||||||
if (defined('NOREDIRECTBYMAINTOLOGIN')) {
|
if (defined('NOREDIRECTBYMAINTOLOGIN')) {
|
||||||
return 'ERROR_NOT_LOGGED';
|
return 'ERROR_NOT_LOGGED';
|
||||||
} else {
|
} else {
|
||||||
@@ -1111,7 +1111,7 @@ if (!defined('NOLOGIN')) {
|
|||||||
$user->getrights();
|
$user->getrights();
|
||||||
}
|
}
|
||||||
|
|
||||||
dol_syslog("--- Access to ".(empty($_SERVER["REQUEST_METHOD"])?'':$_SERVER["REQUEST_METHOD"].' ').$_SERVER["PHP_SELF"].' - action='.GETPOST('action', 'aZ09').', massaction='.GETPOST('massaction', 'aZ09').(defined('NOTOKENRENEWAL') ? ' NOTOKENRENEWAL='.constant('NOTOKENRENEWAL') : ''));
|
dol_syslog("--- Access to ".(empty($_SERVER["REQUEST_METHOD"])?'':$_SERVER["REQUEST_METHOD"].' ').$_SERVER["PHP_SELF"].' - action='.GETPOST('action', 'aZ09').', massaction='.GETPOST('massaction', 'aZ09').(defined('NOTOKENRENEWAL') ? ' NOTOKENRENEWAL='.constant('NOTOKENRENEWAL') : ''), LOG_NOTICE);
|
||||||
//Another call for easy debugg
|
//Another call for easy debugg
|
||||||
//dol_syslog("Access to ".$_SERVER["PHP_SELF"].' '.$_SERVER["HTTP_REFERER"].' GET='.join(',',array_keys($_GET)).'->'.join(',',$_GET).' POST:'.join(',',array_keys($_POST)).'->'.join(',',$_POST));
|
//dol_syslog("Access to ".$_SERVER["PHP_SELF"].' '.$_SERVER["HTTP_REFERER"].' GET='.join(',',array_keys($_GET)).'->'.join(',',$_GET).' POST:'.join(',',array_keys($_POST)).'->'.join(',',$_POST));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user