diff --git a/snappymail/v/0.0.0/app/libraries/RainLoop/Utils.php b/snappymail/v/0.0.0/app/libraries/RainLoop/Utils.php index e8632de31..2d0c91e38 100644 --- a/snappymail/v/0.0.0/app/libraries/RainLoop/Utils.php +++ b/snappymail/v/0.0.0/app/libraries/RainLoop/Utils.php @@ -227,6 +227,7 @@ class Utils return true; } } + \SnappyMail\Log::warning("open_basedir restriction in effect. {$name} is not within the allowed path(s): " . \ini_get('open_basedir')); return false; } return true; diff --git a/snappymail/v/0.0.0/app/libraries/snappymail/log.php b/snappymail/v/0.0.0/app/libraries/snappymail/log.php index b0ce766fd..2fc5c12f9 100644 --- a/snappymail/v/0.0.0/app/libraries/snappymail/log.php +++ b/snappymail/v/0.0.0/app/libraries/snappymail/log.php @@ -49,8 +49,11 @@ abstract class Log protected static function log(int $level, string $prefix, string $msg) { + static $log_level; // Default to level 4, 0 = LOG_EMERG, 7 = LOG_DEBUG - $log_level = \RainLoop\Api::Config()->Get('logs', 'level', \LOG_WARNING); + if (!$log_level) { + $log_level = \max(3, \RainLoop\Api::Config()->Get('logs', 'level', \LOG_WARNING)); + } if ($level <= $log_level) { \RainLoop\Api::Logger()->Write( $msg, diff --git a/snappymail/v/0.0.0/app/libraries/snappymail/pgp/gnupg.php b/snappymail/v/0.0.0/app/libraries/snappymail/pgp/gnupg.php index b16f0bc3e..894180a58 100644 --- a/snappymail/v/0.0.0/app/libraries/snappymail/pgp/gnupg.php +++ b/snappymail/v/0.0.0/app/libraries/snappymail/pgp/gnupg.php @@ -370,10 +370,10 @@ class GnuPG : $this->GPG->verify($signed_text, $signature, $plaintext); if (!$result) { if ($this->GnuPG) { - \error_log('gnupg_verify() failed: ' . $this->GnuPG->geterror() . "\n\n{$signed_text}\n\n{$signature}" ); - \error_log(\print_r($this->GnuPG->geterrorinfo(),1)); + \SnappyMail\Log::notice('gnupg_verify() failed: ' . $this->GnuPG->geterror()); + \SnappyMail\Log::info(\print_r($this->GnuPG->geterrorinfo(),1)); } else { - \error_log('GPG->verify() failed'); + \SnappyMail\Log::notice('GPG->verify() failed'); } } return $result;