mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-30 12:39:20 +03:00
Bugfix: Trying to access array offset on value of type null in /app/libraries/MailSo/Sieve/ManageSieveClient.php on line 223
Bugfix: Return value of RainLoop\UserAgent::getHeader() must be of the type string, null returned in /app/libraries/RainLoop/UserAgent.php on line 156 Bugfix: file_exists() also checks for directory, should use is_file Bugfix: accidentally removed <div id="rl-check"></div>
This commit is contained in:
parent
97bf6f70b8
commit
45fa12be42
6 changed files with 48 additions and 36 deletions
|
|
@ -215,7 +215,7 @@ class ManageSieveClient extends \MailSo\Net\NetClient
|
|||
foreach ($aResponse as $sLine)
|
||||
{
|
||||
$aTokens = $this->parseLine($sLine);
|
||||
if (false === $aTokens)
|
||||
if (!$aTokens)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -635,7 +635,7 @@ class ServiceActions
|
|||
$sThemeValuesFile = APP_VERSION_ROOT_PATH.'app/templates/Themes/values.less';
|
||||
$sThemeTemplateFile = APP_VERSION_ROOT_PATH.'app/templates/Themes/template.less';
|
||||
|
||||
if (\file_exists($sThemeFile) && \file_exists($sThemeTemplateFile) && \file_exists($sThemeValuesFile))
|
||||
if (\is_file($sThemeFile) && \is_file($sThemeTemplateFile) && \is_file($sThemeValuesFile))
|
||||
{
|
||||
$aResult[] = '@base: "'.
|
||||
($bCustomTheme ? Utils::WebPath() : Utils::WebVersionPath()).
|
||||
|
|
@ -645,7 +645,7 @@ class ServiceActions
|
|||
$aResult[] = \file_get_contents($sThemeFile);
|
||||
$aResult[] = \file_get_contents($sThemeTemplateFile);
|
||||
|
||||
if (\file_exists($sThemeExtFile))
|
||||
if (\is_file($sThemeExtFile))
|
||||
{
|
||||
$aResult[] = \file_get_contents($sThemeExtFile);
|
||||
}
|
||||
|
|
@ -1037,7 +1037,7 @@ class ServiceActions
|
|||
$sMomentFileName = APP_VERSION_ROOT_PATH.'app/localization/moment/'.
|
||||
$this->convertLanguageNameToMomentLanguageName($sLanguage).'.js';
|
||||
|
||||
if (\file_exists($sMomentFileName))
|
||||
if (\is_file($sMomentFileName))
|
||||
{
|
||||
$sMoment = \file_get_contents($sMomentFileName);
|
||||
$sMoment = \preg_replace('/\/\/[^\n]+\n/', '', $sMoment);
|
||||
|
|
|
|||
|
|
@ -150,8 +150,10 @@ class UserAgent
|
|||
public static function getHeader() : string
|
||||
{
|
||||
static $agent;
|
||||
if (null === $agent && isset($_SERVER['HTTP_USER_AGENT'])) {
|
||||
$agent = strtolower(substr($_SERVER['HTTP_USER_AGENT'], 0, 500));
|
||||
if (null === $agent) {
|
||||
$agent = isset($_SERVER['HTTP_USER_AGENT'])
|
||||
? strtolower(substr($_SERVER['HTTP_USER_AGENT'], 0, 500))
|
||||
: '';
|
||||
}
|
||||
return $agent;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
|
||||
<body class="thm-body">
|
||||
<div id="rl-app"></div>
|
||||
<div id="rl-check"></div>
|
||||
<script type="text/javascript" data-cfasync="false" src="{{BaseAppBootScriptLink}}"></script>
|
||||
</body>
|
||||
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
|
||||
define('APP_DEFAULT_PRIVATE_DATA_NAME', '_default_');
|
||||
|
||||
$sPrivateDataFolderInternalName = file_exists(APP_INDEX_ROOT_PATH.'MULTIPLY') ? APP_SITE : '';
|
||||
$sPrivateDataFolderInternalName = is_file(APP_INDEX_ROOT_PATH.'MULTIPLY') ? APP_SITE : '';
|
||||
define('APP_PRIVATE_DATA_NAME', 0 === strlen($sPrivateDataFolderInternalName) ? APP_DEFAULT_PRIVATE_DATA_NAME : $sPrivateDataFolderInternalName);
|
||||
define('APP_MULTIPLY', 0 < strlen($sPrivateDataFolderInternalName) && APP_DEFAULT_PRIVATE_DATA_NAME !== APP_PRIVATE_DATA_NAME);
|
||||
|
||||
|
|
@ -40,7 +40,7 @@
|
|||
$sCustomDataPath = '';
|
||||
$sCustomConfiguration = '';
|
||||
|
||||
if (file_exists(APP_INDEX_ROOT_PATH.'include.php'))
|
||||
if (is_file(APP_INDEX_ROOT_PATH.'include.php'))
|
||||
{
|
||||
include_once APP_INDEX_ROOT_PATH.'include.php';
|
||||
}
|
||||
|
|
@ -55,9 +55,9 @@
|
|||
|
||||
define('APP_DATA_FOLDER_PATH_UNIX', str_replace('\\', '/', APP_DATA_FOLDER_PATH));
|
||||
|
||||
$sSalt = file_get_contents(APP_DATA_FOLDER_PATH.'SALT.php');
|
||||
$sData = file_exists(APP_DATA_FOLDER_PATH.'DATA.php') ? file_get_contents(APP_DATA_FOLDER_PATH.'DATA.php') : '';
|
||||
$sInstalled = file_get_contents(APP_DATA_FOLDER_PATH.'INSTALLED');
|
||||
$sSalt = is_file(APP_DATA_FOLDER_PATH.'SALT.php') ? file_get_contents(APP_DATA_FOLDER_PATH.'SALT.php') : '';
|
||||
$sData = is_file(APP_DATA_FOLDER_PATH.'DATA.php') ? file_get_contents(APP_DATA_FOLDER_PATH.'DATA.php') : '';
|
||||
$sInstalled = is_file(APP_DATA_FOLDER_PATH.'INSTALLED') ? file_get_contents(APP_DATA_FOLDER_PATH.'INSTALLED') : '';
|
||||
|
||||
// installation checking data folder
|
||||
if (APP_VERSION !== $sInstalled)
|
||||
|
|
@ -68,8 +68,8 @@
|
|||
$sCheckFolder = APP_DATA_FOLDER_PATH.$sCheckName;
|
||||
$sCheckFilePath = APP_DATA_FOLDER_PATH.$sCheckName.'/'.$sCheckName.'.file';
|
||||
|
||||
unlink($sCheckFilePath);
|
||||
rmdir($sCheckFolder);
|
||||
is_file($sCheckFilePath) && unlink($sCheckFilePath);
|
||||
is_dir($sCheckFolder) && rmdir($sCheckFolder);
|
||||
|
||||
if (!is_dir(APP_DATA_FOLDER_PATH))
|
||||
{
|
||||
|
|
@ -136,9 +136,9 @@
|
|||
file_put_contents(APP_DATA_FOLDER_PATH.'index.html', 'Forbidden');
|
||||
file_put_contents(APP_DATA_FOLDER_PATH.'index.php', 'Forbidden');
|
||||
|
||||
if (!file_exists(APP_DATA_FOLDER_PATH.'.htaccess') && file_exists(APP_VERSION_ROOT_PATH.'app/.htaccess'))
|
||||
if (!is_file(APP_DATA_FOLDER_PATH.'.htaccess') && is_file(APP_VERSION_ROOT_PATH.'app/.htaccess'))
|
||||
{
|
||||
file_put_contents(APP_DATA_FOLDER_PATH.'.htaccess', file_get_contents(APP_VERSION_ROOT_PATH.'app/.htaccess'));
|
||||
copy(APP_VERSION_ROOT_PATH.'app/.htaccess', APP_DATA_FOLDER_PATH.'.htaccess');
|
||||
}
|
||||
|
||||
if (!is_dir(APP_PRIVATE_DATA))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue