mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 20:19:22 +03:00
mailto links fixes
Filters interface fixes DKIM status a new message
This commit is contained in:
parent
0152f1583b
commit
0735071f1c
18 changed files with 212 additions and 113 deletions
|
|
@ -37,6 +37,11 @@ class Email
|
|||
*/
|
||||
private $sDkimStatus;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $sDkimValue;
|
||||
|
||||
/**
|
||||
* @access private
|
||||
*
|
||||
|
|
@ -58,6 +63,7 @@ class Email
|
|||
$this->sRemark = \trim($sRemark);
|
||||
|
||||
$this->sDkimStatus = \MailSo\Mime\Enumerations\DkimStatus::NONE;
|
||||
$this->sDkimValue = '';
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -238,6 +244,14 @@ class Email
|
|||
return $this->sDkimStatus;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function GetDkimValue()
|
||||
{
|
||||
return $this->sDkimValue;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
|
|
@ -258,10 +272,12 @@ class Email
|
|||
|
||||
/**
|
||||
* @param string $sDkimStatus
|
||||
* @param string $sDkimValue = ''
|
||||
*/
|
||||
public function SetDkimStatus($sDkimStatus)
|
||||
public function SetDkimStatusAndValue($sDkimStatus, $sDkimValue = '')
|
||||
{
|
||||
$this->sDkimStatus = \MailSo\Mime\Enumerations\DkimStatus::normalizeValue($sDkimStatus);
|
||||
$this->sDkimValue = $sDkimValue;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -271,7 +287,8 @@ class Email
|
|||
*/
|
||||
public function ToArray($bIdn = false)
|
||||
{
|
||||
return array($this->sDisplayName, $this->GetEmail($bIdn), $this->sRemark, $this->sDkimStatus);
|
||||
return array($this->sDisplayName, $this->GetEmail($bIdn), $this->sRemark,
|
||||
$this->sDkimStatus, $this->sDkimValue);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -394,7 +394,7 @@ class HeaderCollection extends \MailSo\Base\Collection
|
|||
|
||||
if (!empty($sStatus) && !empty($sHeader))
|
||||
{
|
||||
$aResult[] = array($sStatus, $sHeader);
|
||||
$aResult[] = array($sStatus, $sHeader, $sDkimLine);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -426,7 +426,7 @@ class HeaderCollection extends \MailSo\Base\Collection
|
|||
|
||||
if (!empty($sStatus) && !empty($sHeader))
|
||||
{
|
||||
$aResult[] = array($sStatus, $sHeader);
|
||||
$aResult[] = array($sStatus, $sHeader, $sHeaderValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -454,7 +454,7 @@ class HeaderCollection extends \MailSo\Base\Collection
|
|||
if (isset($aDkimData[0], $aDkimData[1]) &&
|
||||
$aDkimData[1] === \strstr($sEmail, $aDkimData[1]))
|
||||
{
|
||||
$oItem->SetDkimStatus($aDkimData[0]);
|
||||
$oItem->SetDkimStatusAndValue($aDkimData[0], empty($aDkimData[2]) ? '' : $aDkimData[2]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5882,6 +5882,11 @@ class Actions
|
|||
$oData = $this->getTwoFactorInfo($oAccount->ParentEmailHelper());
|
||||
$sSecret = !empty($oData['Secret']) ? $oData['Secret'] : '';
|
||||
|
||||
$this->Logger()->WriteDump(array(
|
||||
$sCode, $sSecret, $oData,
|
||||
$this->TwoFactorAuthProvider()->VerifyCode($sSecret, $sCode)
|
||||
));
|
||||
|
||||
\sleep(1);
|
||||
return $this->DefaultResponse(__FUNCTION__,
|
||||
$this->TwoFactorAuthProvider()->VerifyCode($sSecret, $sCode));
|
||||
|
|
@ -8352,7 +8357,8 @@ class Actions
|
|||
$mResult = \array_merge($this->objectData($mResponse, $sParent, $aParameters), array(
|
||||
'Name' => \MailSo\Base\Utils::Utf8Clear($mResponse->GetDisplayName()),
|
||||
'Email' => \MailSo\Base\Utils::Utf8Clear($mResponse->GetEmail(true)),
|
||||
'DkimStatus' => $mResponse->GetDkimStatus()
|
||||
'DkimStatus' => $mResponse->GetDkimStatus(),
|
||||
'DkimValue' => $mResponse->GetDkimValue()
|
||||
));
|
||||
}
|
||||
else if ('RainLoop\Providers\AddressBook\Classes\Contact' === $sClassName)
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@ class SieveStorage implements \RainLoop\Providers\Filters\FiltersInterface
|
|||
{
|
||||
const NEW_LINE = "\r\n";
|
||||
|
||||
const SIEVE_FILE_NAME = 'rainloop.user';
|
||||
const SIEVE_FILE_NAME_RAW = 'rainloop.raw';
|
||||
const SIEVE_FILE_NAME = 'rainloop.sieve.user';
|
||||
const SIEVE_FILE_NAME_RAW = 'rainloop.sieve.raw';
|
||||
|
||||
/**
|
||||
* @var \MailSo\Log\Logger
|
||||
|
|
@ -98,7 +98,7 @@ class SieveStorage implements \RainLoop\Providers\Filters\FiltersInterface
|
|||
'moveto' => \in_array('fileinto', $aModules),
|
||||
'reject' => \in_array('reject', $aModules),
|
||||
'vacation' => \in_array('vacation', $aModules),
|
||||
'markasread' => \in_array('imap4flags', $aModules) && false
|
||||
'markasread' => \in_array('imap4flags', $aModules)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
|
@ -119,33 +119,31 @@ class SieveStorage implements \RainLoop\Providers\Filters\FiltersInterface
|
|||
{
|
||||
$aList = $oSieveClient->ListScripts();
|
||||
|
||||
$sUserFilter = $this->collectionToFileString($aFilters);
|
||||
|
||||
if (!empty($sUserFilter))
|
||||
if ($bRawIsActive)
|
||||
{
|
||||
$oSieveClient->PutScript(self::SIEVE_FILE_NAME, $sUserFilter);
|
||||
if (!$bRawIsActive)
|
||||
{
|
||||
$oSieveClient->SetActiveScript(self::SIEVE_FILE_NAME);
|
||||
}
|
||||
}
|
||||
else if (isset($aList[self::SIEVE_FILE_NAME]))
|
||||
{
|
||||
$oSieveClient->DeleteScript(self::SIEVE_FILE_NAME);
|
||||
}
|
||||
|
||||
$sRaw = \trim($sRaw);
|
||||
if (!empty($sRaw))
|
||||
{
|
||||
$oSieveClient->PutScript(self::SIEVE_FILE_NAME_RAW, $sRaw);
|
||||
if ($bRawIsActive)
|
||||
if (!empty($sRaw))
|
||||
{
|
||||
$oSieveClient->PutScript(self::SIEVE_FILE_NAME_RAW, $sRaw);
|
||||
$oSieveClient->SetActiveScript(self::SIEVE_FILE_NAME_RAW);
|
||||
}
|
||||
else if (isset($aList[self::SIEVE_FILE_NAME_RAW]))
|
||||
{
|
||||
$oSieveClient->DeleteScript(self::SIEVE_FILE_NAME_RAW);
|
||||
}
|
||||
}
|
||||
else if (isset($aList[self::SIEVE_FILE_NAME_RAW]))
|
||||
else
|
||||
{
|
||||
$oSieveClient->DeleteScript(self::SIEVE_FILE_NAME_RAW);
|
||||
$sUserFilter = $this->collectionToFileString($aFilters);
|
||||
|
||||
if (!empty($sUserFilter))
|
||||
{
|
||||
$oSieveClient->PutScript(self::SIEVE_FILE_NAME, $sUserFilter);
|
||||
$oSieveClient->SetActiveScript(self::SIEVE_FILE_NAME);
|
||||
}
|
||||
else if (isset($aList[self::SIEVE_FILE_NAME]))
|
||||
{
|
||||
$oSieveClient->DeleteScript(self::SIEVE_FILE_NAME);
|
||||
}
|
||||
}
|
||||
|
||||
$oSieveClient->LogoutAndDisconnect();
|
||||
|
|
|
|||
|
|
@ -2,14 +2,14 @@
|
|||
|
||||
namespace RainLoop\Providers\TwoFactorAuth;
|
||||
|
||||
class GoogleTwoFactorAuth
|
||||
class GoogleTwoFactorAuth
|
||||
extends \RainLoop\Providers\TwoFactorAuth\AbstractTwoFactorAuth
|
||||
implements \RainLoop\Providers\TwoFactorAuth\TwoFactorAuthInterface
|
||||
{
|
||||
/**
|
||||
* @param string $sSecret
|
||||
* @param string $sCode
|
||||
*
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function VerifyCode($sSecret, $sCode)
|
||||
|
|
@ -17,7 +17,7 @@ class GoogleTwoFactorAuth
|
|||
include_once APP_VERSION_ROOT_PATH.'app/libraries/PHPGangsta/GoogleAuthenticator.php';
|
||||
|
||||
$oGoogleAuthenticator = new \PHPGangsta_GoogleAuthenticator();
|
||||
return $oGoogleAuthenticator->verifyCode($sSecret, $sCode);
|
||||
return $oGoogleAuthenticator->verifyCode($sSecret, $sCode, 8);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1109,6 +1109,7 @@ class ServiceActions
|
|||
}
|
||||
catch (\Exception $oException)
|
||||
{
|
||||
$oException = null;
|
||||
$this->oActions->ClearSignMeData($oAccount);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -86,8 +86,12 @@
|
|||
</a>
|
||||
</div>
|
||||
<div class="btn-group pull-right"> </div>
|
||||
<span class="pull-right" data-bind="visible: !showCcAndBcc()">
|
||||
<span class="i18n g-ui-link" data-i18n-text="COMPOSE/LINK_SHOW_INPUTS" data-bind="click: function () { showCcAndBcc(true); }"></span>
|
||||
<span class="pull-right">
|
||||
<span class="i18n g-ui-link" data-i18n-text="COMPOSE/TITLE_CC"
|
||||
data-bind="visible: !showCc(), click: function () { showCc(true); }"></span>
|
||||
|
||||
<span class="i18n g-ui-link" data-i18n-text="COMPOSE/TITLE_BCC"
|
||||
data-bind="visible: !showBcc(), click: function () { showBcc(true); }"></span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -104,7 +108,7 @@
|
|||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="e-row cc-row" data-bind="visible: showCcAndBcc">
|
||||
<div class="e-row cc-row" data-bind="visible: showCc">
|
||||
<div class="e-cell e-label">
|
||||
<span class="i18n" data-i18n-text="COMPOSE/TITLE_CC"></span>
|
||||
</div>
|
||||
|
|
@ -112,7 +116,7 @@
|
|||
<input type="text" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" data-bind="emailsTags: cc, autoCompleteSource: emailsSource" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="e-row bcc-row" data-bind="visible: showCcAndBcc">
|
||||
<div class="e-row bcc-row" data-bind="visible: showBcc">
|
||||
<div class="e-cell e-label">
|
||||
<span class="i18n" data-i18n-text="COMPOSE/TITLE_BCC"></span>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue