mailto links fixes

Filters interface fixes
DKIM status a new message
This commit is contained in:
RainLoop Team 2015-01-31 23:00:10 +04:00
parent 0152f1583b
commit 0735071f1c
18 changed files with 212 additions and 113 deletions

View file

@ -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)

View file

@ -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();

View file

@ -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);
}
/**

View file

@ -1109,6 +1109,7 @@ class ServiceActions
}
catch (\Exception $oException)
{
$oException = null;
$this->oActions->ClearSignMeData($oAccount);
}
}