mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-25 10:09:20 +03:00
Add github action
This commit is contained in:
parent
1979f84dab
commit
20e0c1417d
17 changed files with 2038 additions and 2040 deletions
|
|
@ -2249,21 +2249,6 @@ END;
|
|||
|
||||
$aCache = \explode(',', $sDisableFunctions);
|
||||
$aCache = \is_array($aCache) && 0 < \count($aCache) ? $aCache : array();
|
||||
|
||||
if (\extension_loaded('suhosin'))
|
||||
{
|
||||
$sSuhosin = @\ini_get('suhosin.executor.func.blacklist');
|
||||
$sSuhosin = \is_string($sSuhosin) && 0 < \strlen($sSuhosin) ? $sSuhosin : '';
|
||||
|
||||
$aSuhosinCache = \explode(',', $sSuhosin);
|
||||
$aSuhosinCache = \is_array($aSuhosinCache) && 0 < \count($aSuhosinCache) ? $aSuhosinCache : array();
|
||||
|
||||
if (0 < \count($aSuhosinCache))
|
||||
{
|
||||
$aCache = \array_merge($aCache, $aSuhosinCache);
|
||||
$aCache = \array_unique($aCache);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return !\in_array($mFunctionNameOrNames, $aCache);
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ if (!\defined('MAILSO_LIBRARY_ROOT_PATH'))
|
|||
include MAILSO_LIBRARY_ROOT_PATH.\str_replace('\\', '/', \substr($sClassName, 7)).'.php' : false;
|
||||
}
|
||||
|
||||
\spl_autoload_register('MailSo\MailSoSplAutoloadRegisterFunction', false);
|
||||
\spl_autoload_register('MailSo\MailSoSplAutoloadRegisterFunction');
|
||||
|
||||
if (\class_exists('MailSo\Base\Loader'))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -493,15 +493,20 @@ class Message
|
|||
|
||||
/**
|
||||
* @param string $sContentType
|
||||
* @param string|resource $mData
|
||||
* @param string $sData
|
||||
* @param string $sContentTransferEncoding = ''
|
||||
* @param array $aCustomContentTypeParams = array()
|
||||
*
|
||||
* @return \MailSo\Mime\Message
|
||||
*/
|
||||
public function AddAlternative($sContentType, $mData, $sContentTransferEncoding = '', $aCustomContentTypeParams = array())
|
||||
public function AddAlternative($sContentType, $sData, $sContentTransferEncoding = '')
|
||||
{
|
||||
$this->aAlternativeParts[] = array($sContentType, $mData, $sContentTransferEncoding, $aCustomContentTypeParams);
|
||||
$this->aAlternativeParts[] = array(
|
||||
$sContentType,
|
||||
\preg_replace('/\\r?\\n/', Enumerations\Constants::CRLF, \trim($sData)),
|
||||
$sContentTransferEncoding,
|
||||
array()
|
||||
);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
|
@ -712,7 +717,7 @@ class Message
|
|||
private function createNewMessageSimpleOrAlternativeBody()
|
||||
{
|
||||
$oResultPart = null;
|
||||
if (1 < count($this->aAlternativeParts))
|
||||
if (1 < \count($this->aAlternativeParts))
|
||||
{
|
||||
$oResultPart = Part::NewInstance();
|
||||
|
||||
|
|
@ -739,7 +744,7 @@ class Message
|
|||
}
|
||||
|
||||
}
|
||||
else if (1 === count($this->aAlternativeParts))
|
||||
else if (1 === \count($this->aAlternativeParts))
|
||||
{
|
||||
$oAlternativePart = $this->createNewMessageAlternativePartBody($this->aAlternativeParts[0]);
|
||||
if ($oAlternativePart)
|
||||
|
|
@ -759,7 +764,7 @@ class Message
|
|||
else
|
||||
{
|
||||
$aAttachments = $this->oAttachmentCollection->CloneAsArray();
|
||||
if (\is_array($aAttachments) && 1 === count($aAttachments) && isset($aAttachments[0]))
|
||||
if (\is_array($aAttachments) && 1 === \count($aAttachments) && isset($aAttachments[0]))
|
||||
{
|
||||
$this->oAttachmentCollection->Clear();
|
||||
|
||||
|
|
@ -784,7 +789,7 @@ class Message
|
|||
$oResultPart = null;
|
||||
|
||||
$aAttachments = $this->oAttachmentCollection->LinkedAttachments();
|
||||
if (0 < count($aAttachments))
|
||||
if (0 < \count($aAttachments))
|
||||
{
|
||||
$oResultPart = Part::NewInstance();
|
||||
|
||||
|
|
@ -824,7 +829,7 @@ class Message
|
|||
$oResultPart = null;
|
||||
|
||||
$aAttachments = $this->oAttachmentCollection->UnlinkedAttachments();
|
||||
if (0 < count($aAttachments))
|
||||
if (0 < \count($aAttachments))
|
||||
{
|
||||
$oResultPart = Part::NewInstance();
|
||||
|
||||
|
|
|
|||
|
|
@ -1154,8 +1154,7 @@ class Actions
|
|||
$sPdo = empty($sPdo) ? '~' : $sPdo;
|
||||
|
||||
$this->oLogger->Write('['.
|
||||
'Suhosin:'.(\extension_loaded('suhosin') || @\ini_get('suhosin.get.max_value_length') ? 'on' : 'off').
|
||||
'][APC:'.(\MailSo\Base\Utils::FunctionExistsAndEnabled('apc_fetch') ? 'on' : 'off').
|
||||
'APC:'.(\MailSo\Base\Utils::FunctionExistsAndEnabled('apc_fetch') ? 'on' : 'off').
|
||||
'][MB:'.(\MailSo\Base\Utils::FunctionExistsAndEnabled('mb_convert_encoding') ? 'on' : 'off').
|
||||
'][PDO:'.$sPdo.
|
||||
(\RainLoop\Utils::IsOwnCloud() ? '][cloud:true' : '').
|
||||
|
|
@ -1845,7 +1844,7 @@ NewThemeLink IncludeCss LoadingDescriptionEsc LangLink IncludeBackground Plugins
|
|||
$aResult['AllowLanguagesOnSettings'] = (bool) $oConfig->Get('webmail', 'allow_languages_on_settings', true);
|
||||
$aResult['AllowLanguagesOnLogin'] = (bool) $oConfig->Get('login', 'allow_languages_on_login', true);
|
||||
$aResult['AttachmentLimit'] = ((int) $oConfig->Get('webmail', 'attachment_size_limit', 10)) * 1024 * 1024;
|
||||
$aResult['SignMe'] = (string) $oConfig->Get('login', 'sign_me_auto', \RainLoop\Enumerations\SignMeType::DEFAILT_OFF);
|
||||
$aResult['SignMe'] = (string) $oConfig->Get('login', 'sign_me_auto', \RainLoop\Enumerations\SignMeType::DEFAULT_OFF);
|
||||
$aResult['UseLocalProxyForExternalImages'] = (bool) $oConfig->Get('labs', 'use_local_proxy_for_external_images', false);
|
||||
|
||||
// user
|
||||
|
|
@ -1997,7 +1996,7 @@ NewThemeLink IncludeCss LoadingDescriptionEsc LangLink IncludeBackground Plugins
|
|||
// Mobile override
|
||||
if ($bMobile)
|
||||
{
|
||||
$aResult['Layout'] = \RainLoop\Enumerations\Layout::NO_PREVIW;
|
||||
$aResult['Layout'] = \RainLoop\Enumerations\Layout::NO_PREVIEW;
|
||||
|
||||
$aResult['SoundNotification'] = false;
|
||||
$aResult['DesktopNotifications'] = false;
|
||||
|
|
@ -5086,7 +5085,7 @@ NewThemeLink IncludeCss LoadingDescriptionEsc LangLink IncludeBackground Plugins
|
|||
});
|
||||
|
||||
$this->setSettingsFromParams($oSettings, 'Layout', 'int', function ($iValue) {
|
||||
return (int) (\in_array((int) $iValue, array(\RainLoop\Enumerations\Layout::NO_PREVIW,
|
||||
return (int) (\in_array((int) $iValue, array(\RainLoop\Enumerations\Layout::NO_PREVIEW,
|
||||
\RainLoop\Enumerations\Layout::SIDE_PREVIEW, \RainLoop\Enumerations\Layout::BOTTOM_PREVIEW)) ?
|
||||
$iValue : \RainLoop\Enumerations\Layout::SIDE_PREVIEW);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -97,10 +97,13 @@ abstract class AbstractConfig
|
|||
switch ($sType)
|
||||
{
|
||||
default:
|
||||
case 'float':
|
||||
case 'string':
|
||||
$this->aData[$sSectionKey][$sParamKey][0] = (string) $mParamValue;
|
||||
break;
|
||||
case 'float':
|
||||
case 'double':
|
||||
$this->aData[$sSectionKey][$sParamKey][0] = (float) $mParamValue;
|
||||
break;
|
||||
case 'int':
|
||||
case 'integer':
|
||||
$this->aData[$sSectionKey][$sParamKey][0] = (int) $mParamValue;
|
||||
|
|
@ -321,6 +324,7 @@ abstract class AbstractConfig
|
|||
break;
|
||||
case 'int':
|
||||
case 'integer':
|
||||
case 'double':
|
||||
$sValue = $mParamValue[0];
|
||||
break;
|
||||
case 'bool':
|
||||
|
|
|
|||
|
|
@ -276,7 +276,7 @@ class Application extends \RainLoop\Config\AbstractConfig
|
|||
|
||||
'login_lowercase' => array(true, ''),
|
||||
|
||||
'sign_me_auto' => array(\RainLoop\Enumerations\SignMeType::DEFAILT_OFF,
|
||||
'sign_me_auto' => array(\RainLoop\Enumerations\SignMeType::DEFAULT_OFF,
|
||||
'This option allows webmail to remember the logged in user
|
||||
once they closed the browser window.
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ namespace RainLoop\Enumerations;
|
|||
|
||||
class Layout
|
||||
{
|
||||
const NO_PREVIW = 0;
|
||||
const NO_PREVIEW = 0;
|
||||
const SIDE_PREVIEW = 1;
|
||||
const BOTTOM_PREVIEW = 2;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ namespace RainLoop\Enumerations;
|
|||
|
||||
class SignMeType
|
||||
{
|
||||
const DEFAILT_OFF = 'DefaultOff';
|
||||
const DEFAILT_ON = 'DefaultOn';
|
||||
const DEFAULT_OFF = 'DefaultOff';
|
||||
const DEFAULT_ON = 'DefaultOn';
|
||||
const UNUSED = 'Unused';
|
||||
}
|
||||
|
|
@ -506,7 +506,7 @@ class ServiceActions
|
|||
if (\method_exists($this->oActions, $sMethodName))
|
||||
{
|
||||
@\header('X-Raw-Action: '.$sMethodName, true);
|
||||
@\header('Content-Security-Policy: script-src \'none\'; frame-src \'none\'; child-src \'none\'', true);
|
||||
@\header('Content-Security-Policy: script-src \'none\'; child-src \'none\'', true);
|
||||
|
||||
$sRawError = '';
|
||||
$this->oActions->SetActionParams(array(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue