mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-09-10 23:24:15 +08:00
Classname \SnappyMail\LOG to \SnappyMail\Log
This commit is contained in:
parent
70093e4d23
commit
66c4c39fea
13 changed files with 23 additions and 23 deletions
|
@ -49,7 +49,7 @@ trait Metadata
|
|||
}
|
||||
}
|
||||
} catch (\Throwable $e) {
|
||||
//\SnappyMail\LOG::warning('IMAP', $e->getMessage());
|
||||
//\SnappyMail\Log::warning('IMAP', $e->getMessage());
|
||||
}
|
||||
return $aReturn;
|
||||
}
|
||||
|
|
|
@ -1172,7 +1172,7 @@ class ImapClient extends \MailSo\Net\NetClient
|
|||
// RFC 5530
|
||||
if ($sEndTag === $oResponse->Tag && \is_array($oResponse->OptionalResponse) && 'CLIENTBUG' === $oResponse->OptionalResponse[0]) {
|
||||
// The server has detected a client bug.
|
||||
// \SnappyMail\LOG::warning('IMAP', "{$oResponse->OptionalResponse[0]}: {$this->lastCommand}");
|
||||
// \SnappyMail\Log::warning('IMAP', "{$oResponse->OptionalResponse[0]}: {$this->lastCommand}");
|
||||
}
|
||||
|
||||
if ($sEndTag === $oResponse->Tag || Enumerations\ResponseType::CONTINUATION === $oResponse->ResponseType) {
|
||||
|
@ -1218,7 +1218,7 @@ class ImapClient extends \MailSo\Net\NetClient
|
|||
// RFC 5530
|
||||
if ($sEndTag === $oResponse->Tag && \is_array($oResponse->OptionalResponse) && 'CLIENTBUG' === $oResponse->OptionalResponse[0]) {
|
||||
// The server has detected a client bug.
|
||||
// \SnappyMail\LOG::warning('IMAP', "{$oResponse->OptionalResponse[0]}: {$this->lastCommand}");
|
||||
// \SnappyMail\Log::warning('IMAP', "{$oResponse->OptionalResponse[0]}: {$this->lastCommand}");
|
||||
}
|
||||
|
||||
if ($sEndTag === $oResponse->Tag || Enumerations\ResponseType::CONTINUATION === $oResponse->ResponseType) {
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
/*
|
||||
* This file is part of MailSo.
|
||||
*
|
||||
* (c) 2022 DJ Maze
|
||||
* (c) 2022 DJMaze
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
|
|
|
@ -183,7 +183,7 @@ trait ResponseParser
|
|||
$this->writeLog('{'.$iLiteralSize.'} '.$sLiteral, \MailSo\Log\Enumerations\Type::INFO);
|
||||
}
|
||||
} else {
|
||||
\SnappyMail\LOG::notice('IMAP', 'Literal treated as atom and skipped');
|
||||
\SnappyMail\Log::notice('IMAP', 'Literal treated as atom and skipped');
|
||||
}
|
||||
unset($sLiteral);
|
||||
} else {
|
||||
|
@ -238,7 +238,7 @@ trait ResponseParser
|
|||
default:
|
||||
case "\r":
|
||||
case "\n":
|
||||
\SnappyMail\LOG::notice('IMAP', 'Invalid char in quoted string: "' . \substr($this->sResponseBuffer, $iPos, $iOffset + $iLength - $iPos) . '"');
|
||||
\SnappyMail\Log::notice('IMAP', 'Invalid char in quoted string: "' . \substr($this->sResponseBuffer, $iPos, $iOffset + $iLength - $iPos) . '"');
|
||||
// Not allowed in quoted string
|
||||
break 2;
|
||||
}
|
||||
|
|
|
@ -734,7 +734,7 @@ class MailClient
|
|||
}
|
||||
catch (\MailSo\Imap\Exceptions\RuntimeException $oException)
|
||||
{
|
||||
\SnappyMail\LOG::warning('MessageListThreadsMap ' . $oException->getMessage());
|
||||
\SnappyMail\Log::warning('MessageListThreadsMap ' . $oException->getMessage());
|
||||
unset($oException);
|
||||
}
|
||||
|
||||
|
@ -1150,7 +1150,7 @@ class MailClient
|
|||
if ($this->oImapClient->IsSupported('LIST-EXTENDED')) {
|
||||
$bUseListSubscribeStatus = false;
|
||||
} else if ($bUseListSubscribeStatus) {
|
||||
//\SnappyMail\LOG::warning('IMAP', 'RFC5258 not supported, using LSUB');
|
||||
//\SnappyMail\Log::warning('IMAP', 'RFC5258 not supported, using LSUB');
|
||||
try
|
||||
{
|
||||
$aSubscribedFolders = $this->oImapClient->FolderSubscribeList($sParent, $sListPattern);
|
||||
|
@ -1162,7 +1162,7 @@ class MailClient
|
|||
}
|
||||
catch (\Throwable $oException)
|
||||
{
|
||||
\SnappyMail\LOG::error('IMAP', 'FolderSubscribeList: ' . $oException->getMessage());
|
||||
\SnappyMail\Log::error('IMAP', 'FolderSubscribeList: ' . $oException->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -507,7 +507,7 @@ trait Messages
|
|||
}
|
||||
catch (\Throwable $oException)
|
||||
{
|
||||
\SnappyMail\LOG::warning('IMAP', "FolderHash({$sFolder}) Exception: {$oException->getMessage()}");
|
||||
\SnappyMail\Log::warning('IMAP', "FolderHash({$sFolder}) Exception: {$oException->getMessage()}");
|
||||
}
|
||||
|
||||
return $this->DefaultResponse(__FUNCTION__, $sHash ? array($sFolder, $sHash) : array($sFromFolder));
|
||||
|
@ -569,7 +569,7 @@ trait Messages
|
|||
}
|
||||
catch (\Throwable $oException)
|
||||
{
|
||||
\SnappyMail\LOG::warning('IMAP', "FolderHash({$sFromFolder}) Exception: {$oException->getMessage()}");
|
||||
\SnappyMail\Log::warning('IMAP', "FolderHash({$sFromFolder}) Exception: {$oException->getMessage()}");
|
||||
}
|
||||
|
||||
return $this->DefaultResponse(__FUNCTION__, $sHash ? array($sFromFolder, $sHash) : array($sFromFolder));
|
||||
|
|
|
@ -248,17 +248,17 @@ trait UserAuth
|
|||
$aData,
|
||||
$bThrowExceptionOnFalse
|
||||
);
|
||||
$oMainAuthAccount || \SnappyMail\LOG::notice('TOKENS', 'AUTH_SPEC_TOKEN_KEY invalid');
|
||||
$oMainAuthAccount || \SnappyMail\Log::notice('TOKENS', 'AUTH_SPEC_TOKEN_KEY invalid');
|
||||
$sToken = $oMainAuthAccount ? Utils::GetSessionToken(false) : null;
|
||||
$sTokenValue = $sToken ? $this->StorageProvider()->Get($oMainAuthAccount, StorageType::SESSION, $sToken) : null;
|
||||
if ($oMainAuthAccount && $sTokenValue) {
|
||||
$this->oMainAuthAccount = $oMainAuthAccount;
|
||||
} else {
|
||||
if ($oMainAuthAccount) {
|
||||
$sToken || \SnappyMail\LOG::notice('TOKENS', 'SESSION_TOKEN not found');
|
||||
$sToken || \SnappyMail\Log::notice('TOKENS', 'SESSION_TOKEN not found');
|
||||
if ($sToken) {
|
||||
$oMainAuthAccount && $this->StorageProvider()->Clear($oMainAuthAccount, StorageType::SESSION, $sToken);
|
||||
$sTokenValue || \SnappyMail\LOG::notice('TOKENS', 'SESSION_TOKEN value invalid: ' . \gettype($sTokenValue));
|
||||
$sTokenValue || \SnappyMail\Log::notice('TOKENS', 'SESSION_TOKEN value invalid: ' . \gettype($sTokenValue));
|
||||
}
|
||||
}
|
||||
Utils::ClearCookie(Utils::SESSION_TOKEN);
|
||||
|
|
|
@ -38,7 +38,7 @@ class FileStorage implements \RainLoop\Providers\Storage\IStorage
|
|||
$sFileName && \RainLoop\Utils::saveFile($sFileName, $sValue);
|
||||
return true;
|
||||
} catch (\Throwable $e) {
|
||||
\SnappyMail\LOG::warning('FileStorage', $e->getMessage());
|
||||
\SnappyMail\Log::warning('FileStorage', $e->getMessage());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -158,9 +158,9 @@ class ServiceActions
|
|||
}
|
||||
catch (\Throwable $oException)
|
||||
{
|
||||
\SnappyMail\LOG::warning('SERVICE', $oException->getMessage());
|
||||
\SnappyMail\Log::warning('SERVICE', $oException->getMessage());
|
||||
if ($e = $oException->getPrevious()) {
|
||||
\SnappyMail\LOG::warning('SERVICE', "\t{$e->getMessage()} @ {$e->getFile()}#{$e->getLine()}");
|
||||
\SnappyMail\Log::warning('SERVICE', "\t{$e->getMessage()} @ {$e->getFile()}#{$e->getLine()}");
|
||||
}
|
||||
|
||||
$aResponseItem = $this->oActions->ExceptionResponse(
|
||||
|
|
|
@ -79,7 +79,7 @@ class Utils
|
|||
if (!$generate) {
|
||||
return null;
|
||||
}
|
||||
\SnappyMail\LOG::debug('TOKENS', 'New SESSION_TOKEN');
|
||||
\SnappyMail\Log::debug('TOKENS', 'New SESSION_TOKEN');
|
||||
$sToken = \MailSo\Base\Utils::Sha1Rand(APP_SALT);
|
||||
static::SetCookie(self::SESSION_TOKEN, $sToken);
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@ class Exif
|
|||
if (false !== $exif) {
|
||||
return \max(0, \intval($exif['IFD0.Orientation'] ?? 0));
|
||||
}
|
||||
\SnappyMail\LOG::warning('EXIF', "{$image_info['mime']} " . \error_get_last()['message']);
|
||||
\SnappyMail\Log::warning('EXIF', "{$image_info['mime']} " . \error_get_last()['message']);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ namespace SnappyMail;
|
|||
|
||||
use MailSo\Log\Enumerations\Type;
|
||||
|
||||
abstract class LOG
|
||||
abstract class Log
|
||||
{
|
||||
// Same as RFC 5424 section 6.2.1 decimal Severity level indicator
|
||||
// http://tools.ietf.org/html/rfc5424#section-6.2.1
|
||||
|
|
|
@ -80,14 +80,14 @@ abstract class Upgrade
|
|||
\hash_hmac('sha1', '', $sHash)
|
||||
];
|
||||
if (!$sToken) {
|
||||
\SnappyMail\LOG::warning('UPGRADE', "ConvertInsecureAccount {$sEmail} no token");
|
||||
\SnappyMail\Log::warning('UPGRADE', "ConvertInsecureAccount {$sEmail} no token");
|
||||
continue;
|
||||
}
|
||||
$aAccountHash = \RainLoop\Utils::DecodeKeyValues($sToken);
|
||||
if (empty($aAccountHash[0]) || 'token' !== $aAccountHash[0] // simple token validation
|
||||
|| 8 > \count($aAccountHash) // length checking
|
||||
) {
|
||||
\SnappyMail\LOG::warning('UPGRADE', "ConvertInsecureAccount {$sEmail} invalid aAccountHash: " . \print_r($aAccountHash,1));
|
||||
\SnappyMail\Log::warning('UPGRADE', "ConvertInsecureAccount {$sEmail} invalid aAccountHash: " . \print_r($aAccountHash,1));
|
||||
continue;
|
||||
}
|
||||
$aAccountHash[3] = Crypt::EncryptUrlSafe($aAccountHash[3], $sHash);
|
||||
|
@ -103,7 +103,7 @@ abstract class Upgrade
|
|||
\hash_hmac('sha1', $aAccountHash[3], $sHash)
|
||||
];
|
||||
} catch (\Throwable $e) {
|
||||
\SnappyMail\LOG::warning('UPGRADE', "ConvertInsecureAccount {$sEmail} failed");
|
||||
\SnappyMail\Log::warning('UPGRADE', "ConvertInsecureAccount {$sEmail} failed");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue