Remove LOGIN parameter (login, ownCloud, sso) (Security fix)

Code refactoring
This commit is contained in:
RainLoop Team 2014-06-26 20:11:49 +04:00
parent cd448ffe91
commit 5d84af4458
22 changed files with 393 additions and 488 deletions

View file

@ -20,27 +20,25 @@ if (isset($_POST['appname'], $_POST['rainloop-password'], $_POST['rainloop-email
$sUser = OCP\User::getUser();
$sPostEmail = $_POST['rainloop-email'];
$sPostLogin = isset($_POST['rainloop-login']) ? $_POST['rainloop-login'] : '';
OCP\Config::setUserValue($sUser, 'rainloop', 'rainloop-email', $sPostEmail);
OCP\Config::setUserValue($sUser, 'rainloop', 'rainloop-login', $sPostLogin);
$sPass = $_POST['rainloop-password'];
if ('******' !== $sPass && '' !== $sPass)
{
include_once OC_App::getAppPath('rainloop').'/lib/RainLoopHelper.php';
OCP\Config::setUserValue($sUser, 'rainloop', 'rainloop-password',
OC_RainLoop_Helper::encodePassword($sPass, md5($sPostEmail.$sPostLogin)));
OC_RainLoop_Helper::encodePassword($sPass, md5($sPostEmail)));
}
$sEmail = OCP\Config::getUserValue($sUser, 'rainloop', 'rainloop-email', '');
$sLogin = OCP\Config::getUserValue($sUser, 'rainloop', 'rainloop-login', '');
}
else
{
OC_JSON::error(array('Message' => 'Invalid argument(s)', 'Email' => $sEmail, 'Login' => $sLogin));
OC_JSON::error(array('Message' => 'Invalid argument(s)', 'Email' => $sEmail));
return false;
}
OCP\JSON::success(array('Message' => 'Saved successfully', 'Email' => $sEmail, 'Login' => $sLogin));
OCP\JSON::success(array('Message' => 'Saved successfully', 'Email' => $sEmail));
return true;

View file

@ -2,7 +2,7 @@
class OC_RainLoop_Helper
{
public static function getSsoHash($sUrl, $sSsoKey, $sEmail, $sPassword, $sLogin = '')
public static function getSsoHash($sUrl, $sSsoKey, $sEmail, $sPassword)
{
if (!function_exists('curl_init'))
{
@ -21,8 +21,7 @@ class OC_RainLoop_Helper
CURLOPT_POSTFIELDS => http_build_query(array(
'SsoKey' => $sSsoKey,
'Email' => $sEmail,
'Password' => $sPassword,
'Login' => $sLogin
'Password' => $sPassword
), '', '&'),
CURLOPT_TIMEOUT => 5
));

View file

@ -30,7 +30,6 @@ else
$sEmail = OCP\Config::getUserValue($sUser, 'rainloop', 'rainloop-email', '');
$oTemplate->assign('rainloop-email', $sEmail);
$oTemplate->assign('rainloop-login', OCP\Config::getUserValue($sUser, 'rainloop', 'rainloop-login', ''));
$sPass = OCP\Config::getUserValue($sUser, 'rainloop', 'rainloop-password', '');
$oTemplate->assign('rainloop-password', 0 === strlen($sPass) && 0 === strlen($sEmail) ? '' : '******');

View file

@ -8,9 +8,6 @@
<input type="text" id="rainloop-email" name="rainloop-email"
value="<?php echo $_['rainloop-email']; ?>" placeholder="<?php p($l->t('Email')); ?>" />
<input type="text" id="rainloop-email" name="rainloop-login"
value="<?php echo $_['rainloop-login']; ?>" placeholder="<?php p($l->t('Login (optional)')); ?>" />
<input type="password" id="rainloop-password" name="rainloop-password"
value="<?php echo $_['rainloop-password']; ?>" placeholder="<?php p($l->t('Password')); ?>" />

View file

@ -985,16 +985,6 @@ RainLoopApp.prototype.getContactsTagsAutocomplete = function (sQuery, fCallback)
}));
};
RainLoopApp.prototype.emailsPicsHashes = function ()
{
RL.remote().emailsPicsHashes(function (sResult, oData) {
if (Enums.StorageResultType.Success === sResult && oData && oData.Result)
{
RL.cache().setEmailsPicsHashesData(oData.Result);
}
});
};
/**
* @param {string} sMailToUrl
* @returns {boolean}
@ -1190,8 +1180,6 @@ RainLoopApp.prototype.bootstart = function ()
_.delay(function () {
RL.emailsPicsHashes();
RL.remote().servicesPics(function (sResult, oData) {
if (Enums.StorageResultType.Success === sResult && oData && oData.Result)
{

View file

@ -214,15 +214,6 @@ LinkBuilder.prototype.langLink = function (sLang)
return this.sServer + '/Lang/0/' + encodeURI(sLang) + '/' + this.sVersion + '/';
};
/**
* @param {string} sHash
* @return {string}
*/
LinkBuilder.prototype.getUserPicUrlFromHash = function (sHash)
{
return this.sServer + '/Raw/' + this.sSpecSuffix + '/UserPic/' + sHash + '/' + this.sVersion + '/';
};
/**
* @return {string}
*/

View file

@ -5,16 +5,10 @@
*/
function AbstractCacheStorage()
{
this.oEmailsPicsHashes = {};
this.oServices = {};
this.bCapaGravatar = RL.capa(Enums.Capa.Gravatar);
}
/**
* @type {Object}
*/
AbstractCacheStorage.prototype.oEmailsPicsHashes = {};
/**
* @type {Object}
*/
@ -28,7 +22,6 @@ AbstractCacheStorage.prototype.bCapaGravatar = false;
AbstractCacheStorage.prototype.clear = function ()
{
this.oServices = {};
this.oEmailsPicsHashes = {};
};
/**
@ -42,19 +35,11 @@ AbstractCacheStorage.prototype.getUserPic = function (sEmail, fCallback)
var
sUrl = '',
sService = '',
sEmailLower = sEmail.toLowerCase(),
sPicHash = Utils.isUnd(this.oEmailsPicsHashes[sEmailLower]) ? '' : this.oEmailsPicsHashes[sEmailLower]
sEmailLower = sEmail.toLowerCase()
;
if ('' !== sPicHash)
{
sUrl = RL.link().getUserPicUrlFromHash(sPicHash);
}
else
{
sService = sEmailLower.substr(sEmail.indexOf('@') + 1);
sUrl = '' !== sService && this.oServices[sService] ? this.oServices[sService] : '';
}
sService = sEmailLower.substr(sEmail.indexOf('@') + 1);
sUrl = '' !== sService && this.oServices[sService] ? this.oServices[sService] : '';
if (this.bCapaGravatar && '' === sUrl && '' !== sEmailLower)
{
@ -75,11 +60,3 @@ AbstractCacheStorage.prototype.setServicesData = function (oData)
{
this.oServices = oData;
};
/**
* @param {Object} oData
*/
AbstractCacheStorage.prototype.setEmailsPicsHashesData = function (oData)
{
this.oEmailsPicsHashes = oData;
};

View file

@ -728,14 +728,6 @@ WebMailAjaxRemoteStorage.prototype.servicesPics = function (fCallback)
this.defaultRequest(fCallback, 'ServicesPics');
};
/**
* @param {?Function} fCallback
*/
WebMailAjaxRemoteStorage.prototype.emailsPicsHashes = function (fCallback)
{
this.defaultRequest(fCallback, 'EmailsPicsHashes');
};
/**
* @param {?Function} fCallback
*/

View file

@ -209,7 +209,6 @@ class ImapClient extends \MailSo\Net\NetClient
{
if ($this->oLogger)
{
$this->oLogger->AddSecret($this->EscapeString($sLogin));
$this->oLogger->AddSecret($this->EscapeString($sPassword));
}

View file

@ -158,14 +158,6 @@ class Actions
return $this->sSpecAuthToken;
}
/**
* @return string
*/
public function BuildSsoCacherKey($sSsoHash)
{
return '/Sso/Data/'.$sSsoHash.'/Login/';
}
/**
* @return \RainLoop\Application
*/
@ -409,8 +401,9 @@ class Actions
$this->StorageProvider()->Put(null,
\RainLoop\Providers\Storage\Enumerations\StorageType::NOBODY,
'SignMe/UserToken/'.$oAccount->SignMeToken(),
$oAccount->GetAuthToken());
\RainLoop\KeyPathHelper::SignMeUserToken($oAccount->SignMeToken()),
$oAccount->GetAuthToken()
);
}
}
}
@ -975,7 +968,7 @@ class Actions
{
$oAccount = $this->GetAccountFromCustomToken($this->StorageProvider()->Get(null,
\RainLoop\Providers\Storage\Enumerations\StorageType::NOBODY,
'SignMe/UserToken/'.$sSignMeToken
\RainLoop\KeyPathHelper::SignMeUserToken($sSignMeToken)
), false, false);
}
@ -1418,7 +1411,6 @@ class Actions
/**
* @param string $sEmail
* @param string $sLogin
* @param string $sPassword
* @param string $sSignMeToken = ''
* @param string $sAdditionalCode = ''
@ -1427,7 +1419,7 @@ class Actions
* @return \RainLoop\Account
* @throws \RainLoop\Exceptions\ClientException
*/
public function LoginProcess(&$sEmail, &$sLogin, &$sPassword, $sSignMeToken = '',
public function LoginProcess(&$sEmail, &$sPassword, $sSignMeToken = '',
$sAdditionalCode = '', $bAdditionalCodeSignMeSignMe = false)
{
if (false === \strpos($sEmail, '@') && 0 < \strlen(\trim($this->Config()->Get('login', 'default_domain', ''))))
@ -1435,13 +1427,13 @@ class Actions
$sEmail = $sEmail.'@'.\trim(\trim($this->Config()->Get('login', 'default_domain', '')), ' @');
}
if (0 === \strlen($sLogin))
{
$sLogin = $sEmail;
}
$this->Logger()->AddSecret($sPassword);
$sLogin = $sEmail;
$this->Plugins()->RunHook('filter.login-credentials', array(&$sEmail, &$sLogin, &$sPassword));
$this->Logger()->AddSecret($sPassword);
$oAccount = $this->LoginProvide($sEmail, $sLogin, $sPassword, $sSignMeToken);
if (!($oAccount instanceof \RainLoop\Account))
{
@ -1538,14 +1530,11 @@ class Actions
$sAdditionalCode = $this->GetActionParam('AdditionalCode', '');
$bAdditionalCodeSignMe = '1' === (string) $this->GetActionParam('AdditionalCodeSignMe', '0');
$this->Logger()->AddSecret($sPassword);
$oAccount = null;
try
{
$sLogin = '';
$oAccount = $this->LoginProcess($sEmail, $sLogin, $sPassword,
$oAccount = $this->LoginProcess($sEmail, $sPassword,
$bSignMe ? \md5(\microtime(true).APP_SALT.\rand(10000, 99999).$sEmail) : '',
$sAdditionalCode, $bAdditionalCodeSignMe);
}
@ -1592,10 +1581,11 @@ class Actions
{
$sAccounts = $this->StorageProvider()->Get(null,
\RainLoop\Providers\Storage\Enumerations\StorageType::NOBODY,
'Webmail/Accounts/'.$sParentEmail.'/Array', null);
\RainLoop\KeyPathHelper::WebmailAccounts($sParentEmail),
null
);
$aAccounts = $sAccounts ? @\unserialize($sAccounts) : array();
if (\is_array($aAccounts) && 0 < \count($aAccounts))
{
if (1 === \count($aAccounts))
@ -1670,12 +1660,12 @@ class Actions
(1 === \count($aAccounts) && !empty($aAccounts[$sParentEmail])))
{
$this->StorageProvider()->Clear(null, \RainLoop\Providers\Storage\Enumerations\StorageType::NOBODY,
'Webmail/Accounts/'.$sParentEmail.'/Array');
\RainLoop\KeyPathHelper::WebmailAccounts($sParentEmail));
}
else
{
$this->StorageProvider()->Put(null, \RainLoop\Providers\Storage\Enumerations\StorageType::NOBODY,
'Webmail/Accounts/'.$sParentEmail.'/Array', @\serialize($aAccounts));
\RainLoop\KeyPathHelper::WebmailAccounts($sParentEmail), @\serialize($aAccounts));
}
}
@ -1720,8 +1710,6 @@ class Actions
$sEmail = \trim($this->GetActionParam('Email', ''));
$sPassword = $this->GetActionParam('Password', '');
$this->Logger()->AddSecret($sPassword);
$sParentEmail = $oAccount->ParentEmailHelper();
$sEmail = \MailSo\Base\Utils::IdnToAscii($sEmail, true);
@ -1730,8 +1718,7 @@ class Actions
throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::AccountAlreadyExists);
}
$sLogin = '';
$oNewAccount = $this->LoginProcess($sEmail, $sLogin, $sPassword);
$oNewAccount = $this->LoginProcess($sEmail, $sPassword);
$oNewAccount->SetParentEmail($sParentEmail);
$aAccounts = $this->GetAccounts($oAccount);
@ -1938,7 +1925,8 @@ class Actions
$this->StorageProvider()->Clear(null,
\RainLoop\Providers\Storage\Enumerations\StorageType::NOBODY,
'SignMe/UserToken/'.$oAccount->SignMeToken());
\RainLoop\KeyPathHelper::SignMeUserToken($oAccount->SignMeToken())
);
}
}
@ -2325,10 +2313,10 @@ class Actions
if (2 < \strlen($sDomain))
{
$sValue = '';
$iTime = $this->Cacher()->GetTimer('Licensing/DomainKey/Value/'.$sDomain);
$iTime = $this->Cacher()->GetTimer(\RainLoop\KeyPathHelper::LicensingDomainKeyValue($sDomain));
if (!$sForce && $iTime + 60 * 5 > \time())
{
$sValue = $this->Cacher()->Get('Licensing/DomainKey/Value/'.$sDomain);
$sValue = $this->Cacher()->Get(\RainLoop\KeyPathHelper::LicensingDomainKeyValue($sDomain));
}
if (0 === \strlen($sValue))
@ -2350,8 +2338,8 @@ class Actions
\sleep(1);
}
$this->Cacher()->Set('Licensing/DomainKey/Value/'.$sDomain, $sValue);
$this->Cacher()->SetTimer('Licensing/DomainKey/Value/'.$sDomain);
$this->Cacher()->Set(\RainLoop\KeyPathHelper::LicensingDomainKeyValue($sDomain), $sValue);
$this->Cacher()->SetTimer(\RainLoop\KeyPathHelper::LicensingDomainKeyValue($sDomain));
}
$aMatch = array();
@ -2663,7 +2651,7 @@ class Actions
$oHttp = \MailSo\Base\Http::SingletonInstance();
$sCacheKey = 'UPDATER/('.$sRepo.')/'.$sRepoFile;
$sCacheKey = \RainLoop\KeyPathHelper::RepositoryCacheFile($sRepo, $sRepoFile);
$sRep = $this->Cacher()->Get($sCacheKey);
if ('' !== $sRep)
{
@ -2747,7 +2735,7 @@ class Actions
$oHttp = \MailSo\Base\Http::SingletonInstance();
$sCacheKey = 'CORE-UPDATER/'.$sRepo;
$sCacheKey = \RainLoop\KeyPathHelper::RepositoryCacheCore($sRepo);
$sRep = $this->Cacher()->Get($sCacheKey);
if ('' !== $sRep)
{
@ -3419,14 +3407,6 @@ class Actions
$this->setSettingsFromParams($oSettings, 'SignatureToAll', 'bool');
$this->setSettingsFromParams($oSettings, 'EnableTwoFactor', 'bool');
$this->setSettingsFromParams($oSettings, 'CustomThemeImg', 'string');
if ('' === $oSettings->GetConf('CustomThemeImg', ''))
{
$this->StorageProvider()->Clear($oAccount,
\RainLoop\Providers\Storage\Enumerations\StorageType::USER, 'CustomThemeBackground');
}
return $this->DefaultResponse(__FUNCTION__,
$this->SettingsProvider()->Save($oAccount, $oSettings));
}
@ -4725,7 +4705,7 @@ class Actions
$sFolderFullName = $this->GetActionParam('MessageFolder', '');
$sUid = $this->GetActionParam('MessageUid', '');
$this->Cacher()->Set('/ReadReceipt/'.$oAccount->Email().'/'.$sFolderFullName.'/'.$sUid, '1');
$this->Cacher()->Set(\RainLoop\KeyPathHelper::ReadReceiptCache($oAccount->Email(), $sFolderFullName, $sUid), '1');
if (0 < \strlen($sFolderFullName) && 0 < \strlen($sUid))
{
@ -4779,7 +4759,8 @@ class Actions
{
$mResult = null;
$sData = $this->StorageProvider()->Get($oAccount->ParentEmailHelper(),
$sData = $this->StorageProvider()->Get(
$oAccount->ParentEmailHelper(),
\RainLoop\Providers\Storage\Enumerations\StorageType::CONFIG,
'contacts_sync'
);
@ -4821,7 +4802,8 @@ class Actions
$mData = $this->getContactsSyncData($oAccount);
$bResult = $this->StorageProvider()->Put($oAccount->ParentEmailHelper(),
$bResult = $this->StorageProvider()->Put(
$oAccount->ParentEmailHelper(),
\RainLoop\Providers\Storage\Enumerations\StorageType::CONFIG,
'contacts_sync',
\RainLoop\Utils::EncodeKeyValues(array(
@ -4883,7 +4865,7 @@ class Actions
$sData = $this->StorageProvider()->Get(null,
\RainLoop\Providers\Storage\Enumerations\StorageType::NOBODY,
'TwoFactorAuth/User/'.$sEmail.'/Data/'
\RainLoop\KeyPathHelper::TwoFactorAuthUserData($sEmail)
);
if ($sData)
@ -4941,7 +4923,7 @@ class Actions
$sData = $this->StorageProvider()->Get(null,
\RainLoop\Providers\Storage\Enumerations\StorageType::NOBODY,
'TwoFactorAuth/User/'.$sEmail.'/Data/'
\RainLoop\KeyPathHelper::TwoFactorAuthUserData($sEmail)
);
if ($sData)
@ -4957,7 +4939,7 @@ class Actions
return $this->StorageProvider()->Put(null,
\RainLoop\Providers\Storage\Enumerations\StorageType::NOBODY,
'TwoFactorAuth/User/'.$sEmail.'/Data/',
\RainLoop\KeyPathHelper::TwoFactorAuthUserData($sEmail),
\RainLoop\Utils::EncodeKeyValues($mData)
);
}
@ -5005,7 +4987,7 @@ class Actions
$this->StorageProvider()->Put(null,
\RainLoop\Providers\Storage\Enumerations\StorageType::NOBODY,
'TwoFactorAuth/User/'.$sEmail.'/Data/',
\RainLoop\KeyPathHelper::TwoFactorAuthUserData($sEmail),
\RainLoop\Utils::EncodeKeyValues(array(
'User' => $sEmail,
'Enable' => false,
@ -5060,7 +5042,7 @@ class Actions
{
$bResult = $this->StorageProvider()->Put(null,
\RainLoop\Providers\Storage\Enumerations\StorageType::NOBODY,
'TwoFactorAuth/User/'.$sEmail.'/Data/',
\RainLoop\KeyPathHelper::TwoFactorAuthUserData($sEmail),
\RainLoop\Utils::EncodeKeyValues(array(
'User' => $sEmail,
'Enable' => '1' === \trim($this->GetActionParam('Enable', '0')),
@ -5109,7 +5091,7 @@ class Actions
$this->StorageProvider()->Clear(null,
\RainLoop\Providers\Storage\Enumerations\StorageType::NOBODY,
'TwoFactorAuth/User/'.$oAccount->ParentEmailHelper().'/Data/'
\RainLoop\KeyPathHelper::TwoFactorAuthUserData($oAccount->ParentEmailHelper())
);
return $this->DefaultResponse(__FUNCTION__,
@ -5288,7 +5270,6 @@ class Actions
$aResult = \array_slice($aResult, 0, $iLimit);
}
// Plugins
$this->Plugins()->RunHook('ajax.suggestions-post', array(&$aResult, $sQuery, $oAccount, $iLimit));
if ($iLimit < \count($aResult))
@ -5299,15 +5280,6 @@ class Actions
return $this->DefaultResponse(__FUNCTION__, $aResult);
}
/**
* @return array
*/
public function DoEmailsPicsHashes()
{
// $oAccount = $this->getAccountFromToken();
return $this->DefaultResponse(__FUNCTION__, array());
}
/**
* @return array
*/
@ -6188,6 +6160,7 @@ class Actions
{
$sIfModifiedSince = $this->Http()->GetHeader('If-Modified-Since', '');
$sIfNoneMatch = $this->Http()->GetHeader('If-None-Match', '');
if (!empty($sIfModifiedSince) || !empty($sIfNoneMatch))
{
$this->Http()->StatusHeader(304);
@ -6308,42 +6281,6 @@ class Actions
$this->AddressBookProvider($oAccount)->Export($oAccount->ParentEmailHelper(), 'csv') : false;
}
/**
* @return bool
*/
public function RawUserPic()
{
$sRawKey = (string) $this->GetActionParam('RawKey', '');
if (!empty($sRawKey))
{
$this->verifyCacheByKey($sRawKey);
}
$oAccount = $this->getAccountFromToken();
$sData = $this->StorageProvider()->Get($oAccount,
\RainLoop\Providers\Storage\Enumerations\StorageType::USER, 'contacts/'.$sRawKey);
if ($sData)
{
$aData = \explode('|||', $sData, 2);
if (\is_array($aData) && 2 === \count($aData) && !empty($aData[0]) && !empty($aData[1]))
{
header('Content-Type: '.$aData[0]);
header('Content-Disposition: inline; filename="'.\preg_replace('/[^a-zA-Z0-9]+/', '.', $aData[0]).'"', true);
header('Accept-Ranges: none', true);
header('Content-Transfer-Encoding: binary');
$this->cacheByKey($sRawKey);
echo \MailSo\Base\Utils::Base64Decode($aData[1]);
return true;
}
}
return false;
}
/**
* @return \RainLoop\Account|bool
*/
@ -6878,7 +6815,6 @@ class Actions
{
$aNames = explode('\\', get_class($oData));
$mResult = array(
// '@Action' => $sParent,
'@Object' => end($aNames)
);
@ -7147,7 +7083,7 @@ class Actions
try
{
$oReadReceipt = \MailSo\Mime\Email::Parse($mResult['ReadReceipt']);
if (!$oReadReceipt || ($oReadReceipt && $oAccount->Email() === $oReadReceipt->GetEmail()))
if (!$oReadReceipt)
{
$mResult['ReadReceipt'] = '';
}
@ -7156,7 +7092,7 @@ class Actions
}
if (0 < \strlen($mResult['ReadReceipt']) && '1' === $this->Cacher()->Get(
'/ReadReceipt/'.$oAccount->Email().'/'.$mResult['Folder'].'/'.$mResult['Uid'], '0'))
\RainLoop\KeyPathHelper::ReadReceiptCache($oAccount->Email(), $mResult['Folder'], $mResult['Uid']), '0'))
{
$mResult['ReadReceipt'] = '';
}

View file

@ -70,19 +70,17 @@ class Api
/**
* @param string $sEmail
* @param string $sPassword
* @param string $sLogin = ''
* @param bool $bUseTimeout = true
*
* @return string
*/
public static function GetUserSsoHash($sEmail, $sPassword, $sLogin = '', $bUseTimeout = true)
public static function GetUserSsoHash($sEmail, $sPassword, $bUseTimeout = true)
{
$sSsoHash = \sha1(\rand(10000, 99999).$sEmail.$sPassword.$sLogin.\microtime(true));
$sSsoHash = \sha1(\rand(10000, 99999).$sEmail.$sPassword.\microtime(true));
return self::Actions()->Cacher()->Set(self::Actions()->BuildSsoCacherKey($sSsoHash), \RainLoop\Utils::EncodeKeyValues(array(
return self::Actions()->Cacher()->Set(\RainLoop\KeyPathHelper::SsoCacherKey($sSsoHash), \RainLoop\Utils::EncodeKeyValues(array(
'Email' => $sEmail,
'Password' => $sPassword,
'Login' => $sLogin,
'Time' => $bUseTimeout ? \time() : 0
))) ? $sSsoHash : '';
}
@ -94,6 +92,23 @@ class Api
*/
public static function ClearUserSsoHash($sSsoHash)
{
return self::Actions()->Delete(self::Actions()->BuildSsoCacherKey($sSsoHash));
return self::Actions()->Cacher()->Delete(\RainLoop\KeyPathHelper::SsoCacherKey($sSsoHash));
}
/**
* @todo
* @param string $sEmail
*
* @return bool
*/
public static function ClearUserDateStorage($sEmail)
{
$sEmail = \MailSo\Base\Utils::IdnToAscii($sEmail);
// TwoFactor Auth User Data
self::Actions()->StorageProvider()->Clear(null,
\RainLoop\Providers\Storage\Enumerations\StorageType::NOBODY,
\RainLoop\KeyPathHelper::TwoFactorAuthUserData($sEmail)
);
}
}

View file

@ -0,0 +1,132 @@
<?php
namespace RainLoop;
class KeyPathHelper
{
/**
* @param string $sEmail
*
* @return string
*/
static public function TwoFactorAuthUserData($sEmail)
{
return 'TwoFactorAuth/User/'.$sEmail.'/Data/';
}
/**
* @param string $sSsoHash
*
* @return string
*/
static public function SsoCacherKey($sSsoHash)
{
return '/Sso/Data/'.$sSsoHash.'/Login/';
}
/**
* @param string $sSignMeToken
*
* @return string
*/
static public function SignMeUserToken($sSignMeToken)
{
return '/SignMe/UserToken/'.$sSignMeToken;
}
/**
* @param string $sEmail
*
* @return string
*/
static public function WebmailAccounts($sEmail)
{
return 'Webmail/Accounts/'.$sEmail.'/Array';
}
/**
* @param string $sDomain
*
* @return string
*/
static public function LicensingDomainKeyValue($sDomain)
{
return 'Licensing/DomainKey/Value/'.$sDomain;
}
/**
* @param string $sRepo
* @param string $sRepoFile
*
* @return string
*/
static public function RepositoryCacheFile($sRepo, $sRepoFile)
{
return 'RepositoryCache/Repo/'.$sRepo.'/File/'.$sRepoFile;
}
/**
* @param string $sRepo
*
* @return string
*/
static public function RepositoryCacheCore($sRepo)
{
return 'RepositoryCache/CoreRepo/'.$sRepo;
}
/**
* @param string $sEmail
* @param string $sFolderFullName
* @param string $sUid
*
* @return string
*/
static public function ReadReceiptCache($sEmail, $sFolderFullName, $sUid)
{
return '/ReadReceipt/'.$sEmail.'/'.$sFolderFullName.'/'.$sUid;
}
/**
* @param string $sLanguage
* @param string $sPluginsHash
*
* @return string
*/
static public function LangCache($sLanguage, $sPluginsHash)
{
return '/LangCache/'.$sPluginsHash.'/'.$sLanguage.'/'.APP_VERSION.'/';
}
/**
* @param bool $bAdmin
* @param string $sPluginsHash
*
* @return string
*/
static public function TemplatesCache($bAdmin, $sPluginsHash)
{
return '/TemplatesCache/'.$sPluginsHash.'/'.($bAdmin ? 'Admin' : 'App').'/'.APP_VERSION.'/';
}
/**
* @param string $sPluginsHash
*
* @return string
*/
static public function PluginsJsCache($sPluginsHash)
{
return '/PluginsJsCache/'.$sPluginsHash.'/'.APP_VERSION.'/';
}
/**
* @param string $sTheme
* @param string $sPluginsHash
*
* @return string
*/
static public function CssCache($sPluginsHash)
{
return '/CssCache/'.$sPluginsHash.'/'.$sTheme.'/'.APP_VERSION.'/';
}
}

View file

@ -229,6 +229,8 @@ class PdoAddressBook
'password' => $sPassword
);
$this->oLogger->AddSecret($sPassword);
if (!empty($sProxy))
{
$aSettings['proxy'] = $sProxy;
@ -239,7 +241,6 @@ class PdoAddressBook
$oClient = new \Sabre\DAV\Client($aSettings);
$oClient->setVerifyPeer(false);
$this->oLogger->AddSecret($sPassword);
$this->oLogger->Write('User: '.$aSettings['userName'].', Url: '.$sUrl, \MailSo\Log\Enumerations\Type::INFO, 'DAV');
$aRemoteSyncData = $this->prepearRemoteSyncData($oClient, $sPath);

View file

@ -85,11 +85,8 @@ class Service
break;
}
if (!\in_array($sErrStr, array('iconv(): Detected an illegal character in input string')))
{
$this->oActions->Logger()->Write($sErrFile.' [line:'.$iErrLine.', code:'.$iErrNo.']', $iType, 'PHP');
$this->oActions->Logger()->Write('Error: '.$sErrStr, $iType, 'PHP');
}
$this->oActions->Logger()->Write($sErrFile.' [line:'.$iErrLine.', code:'.$iErrNo.']', $iType, 'PHP');
$this->oActions->Logger()->Write('Error: '.$sErrStr, $iType, 'PHP');
return false;
}

View file

@ -351,27 +351,9 @@ class ServiceActions
$aData = \RainLoop\Utils::DecodeKeyValues($sData);
if (\is_array($aData) && !empty($aData['Token']) && !empty($aData['Url']) && $aData['Token'] === \RainLoop\Utils::GetConnectionToken())
{
$sUrl = $aData['Url'];
$aOptions = array(
CURLOPT_URL => $sUrl,
CURLOPT_HEADER => false,
CURLOPT_USERAGENT => 'RainLoop External Proxy',
CURLOPT_FAILONERROR => true,
CURLOPT_SSL_VERIFYPEER => false,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => false,
CURLOPT_TIMEOUT => (int) 10
);
$oCurl = \curl_init();
\curl_setopt_array($oCurl, $aOptions);
$mResult = \curl_exec($oCurl);
$iCode = (int) \curl_getinfo($oCurl, CURLINFO_HTTP_CODE);
$sContentType = (string) \curl_getinfo($oCurl, CURLINFO_CONTENT_TYPE);
$sContentType = \trim(\strtolower($sContentType));
$iCode = 404;
$sContentType = '';
$mResult = $this->oHttp->GetUrlAsString($aData['Url'], 'RainLoop External Proxy', $sContentType, $iCode);
if (false !== $mResult && 200 === $iCode &&
\in_array($sContentType, array('image/png', 'image/jpeg', 'image/jpg', 'image/bmp', 'image/gif')))
@ -383,11 +365,6 @@ class ServiceActions
\header('Content-Type: '.$sContentType);
echo $mResult;
}
if (\is_resource($oCurl))
{
\curl_close($oCurl);
}
}
}
@ -480,7 +457,7 @@ class ServiceActions
$sCacheFileName = '';
if ($bCacheEnabled)
{
$sCacheFileName = 'LANG:'.$this->oActions->Plugins()->Hash().$sLanguage.APP_VERSION;
$sCacheFileName = \RainLoop\KeyPathHelper::LangCache($sLanguage, $this->oActions->Plugins()->Hash());
$sResult = $this->Cacher()->Get($sCacheFileName);
}
@ -521,7 +498,7 @@ class ServiceActions
$sCacheFileName = '';
if ($bCacheEnabled)
{
$sCacheFileName = 'TEMPLATES:'.($bAdmin ? 'Admin/' : 'App/').$this->oActions->Plugins()->Hash().APP_VERSION;
$sCacheFileName = \RainLoop\KeyPathHelper::TemplatesCache($bAdmin, $this->oActions->Plugins()->Hash());
$sResult = $this->Cacher()->Get($sCacheFileName);
}
@ -561,7 +538,7 @@ class ServiceActions
$sCacheFileName = '';
if ($bCacheEnabled)
{
$sCacheFileName = 'PLUGIN:'.$this->oActions->Plugins()->Hash().APP_VERSION;
$sCacheFileName = \RainLoop\KeyPathHelper::PluginsJsCache($this->oActions->Plugins()->Hash());
$sResult = $this->Cacher()->Get($sCacheFileName);
}
@ -622,7 +599,7 @@ class ServiceActions
$sCacheFileName = '';
if ($bCacheEnabled)
{
$sCacheFileName = 'THEMES/PLUGINS:'.$sTheme.':'.$this->Plugins()->Hash();
$sCacheFileName = \RainLoop\KeyPathHelper::CssCache($sTheme, $this->oActions->Plugins()->Hash());
$sResult = $this->Cacher()->Get($sCacheFileName);
}
@ -811,27 +788,24 @@ class ServiceActions
if (!empty($sSsoHash))
{
$mData = null;
$sSsoKey = $this->oActions->BuildSsoCacherKey($sSsoHash);
$sSsoSubData = $this->Cacher()->Get($sSsoKey);
$sSsoSubData = $this->Cacher()->Get(\RainLoop\KeyPathHelper::SsoCacherKey($sSsoHash));
if (!empty($sSsoSubData))
{
$mData = \RainLoop\Utils::DecodeKeyValues($sSsoSubData);
$this->Cacher()->Delete($sSsoKey);
$this->Cacher()->Delete(\RainLoop\KeyPathHelper::SsoCacherKey($sSsoHash));
if (\is_array($mData) && !empty($mData['Email']) && isset($mData['Password'], $mData['Time']) &&
(0 === $mData['Time'] || \time() - 10 < $mData['Time']))
{
$sEmail = \trim($mData['Email']);
$sPassword = $mData['Password'];
$sLogin = isset($mData['Login']) ? $mData['Login'] : '';
try
{
$this->oActions->Logger()->AddSecret($sPassword);
$oAccount = $this->oActions->LoginProcess($sEmail, $sLogin, $sPassword);
$oAccount = $this->oActions->LoginProcess($sEmail, $sPassword);
$this->oActions->AuthProcess($oAccount);
$bLogout = !($oAccount instanceof \RainLoop\Account);
}
catch (\Exception $oException)
@ -861,16 +835,13 @@ class ServiceActions
$bLogout = true;
$sEmail = $this->oHttp->GetEnv('REMOTE_USER', '');
$sLogin = '';
$sPassword = $this->oHttp->GetEnv('REMOTE_PASSWORD', '');
if (0 < \strlen($sEmail) && 0 < \strlen(\trim($sPassword)))
{
try
{
$this->oActions->Logger()->AddSecret($sPassword);
$oAccount = $this->oActions->LoginProcess($sEmail, $sLogin, $sPassword);
$oAccount = $this->oActions->LoginProcess($sEmail, $sPassword);
$this->oActions->AuthProcess($oAccount);
$bLogout = !($oAccount instanceof \RainLoop\Account);
}
@ -901,14 +872,11 @@ class ServiceActions
if ($this->oActions->Config()->Get('labs', 'allow_external_login', false))
{
$sEmail = \trim($this->oHttp->GetRequest('Email', ''));
$sLogin = \trim($this->oHttp->GetRequest('Login', ''));
$sPassword = $this->oHttp->GetRequest('Password', '');
try
{
$this->oActions->Logger()->AddSecret($sPassword);
$oAccount = $this->oActions->LoginProcess($sEmail, $sLogin, $sPassword);
$oAccount = $this->oActions->LoginProcess($sEmail, $sPassword);
$this->oActions->AuthProcess($oAccount);
$bLogout = !($oAccount instanceof \RainLoop\Account);
}
@ -963,34 +931,42 @@ class ServiceActions
*/
public function ServiceExternalSso()
{
$sResult = '';
$bLogout = true;
$sKey = $this->oActions->Config()->Get('labs', 'external_sso_key', '');
if ($this->oActions->Config()->Get('labs', 'allow_external_sso', false) &&
!empty($sKey) && $sKey === \trim($this->oHttp->GetRequest('SsoKey', '')))
{
$sEmail = \trim($this->oHttp->GetRequest('Email', ''));
$sLogin = \trim($this->oHttp->GetRequest('Login', ''));
$sPassword = $this->oHttp->GetRequest('Password', '');
\RainLoop\Api::Handle();
$sResult = \RainLoop\Api::GetUserSsoHash($sEmail, $sPassword, $sLogin);
$sResult = \RainLoop\Api::GetUserSsoHash($sEmail, $sPassword);
$bLogout = 0 === \strlen($sResult);
switch (\strtolower($this->oHttp->GetRequest('Output', 'Plain')))
{
case 'plain':
@\header('Content-Type: text/plain');
return $sResult;
break;
case 'json':
@\header('Content-Type: application/json; charset=utf-8');
return \MailSo\Base\Utils::Php2js(array(
$sResult = \MailSo\Base\Utils::Php2js(array(
'Action' => 'ExternalSso',
'Result' => $sResult
), $this->Logger());
break;
}
}
return '';
if ($bLogout)
{
$this->oActions->SetAuthLogoutToken();
}
return $sResult;
}
/**

View file

@ -355,11 +355,9 @@ class Social
$aUserData = \RainLoop\Utils::DecodeKeyValues($sUserData);
if ($aUserData && \is_array($aUserData) &&
!empty($aUserData['Email']) &&
!empty($aUserData['Login']) &&
isset($aUserData['Password']))
!empty($aUserData['Email']) && isset($aUserData['Password']))
{
$oAccount = $this->oActions->LoginProcess($aUserData['Email'], $aUserData['Login'], $aUserData['Password']);
$oAccount = $this->oActions->LoginProcess($aUserData['Email'], $aUserData['Password']);
if ($oAccount instanceof \RainLoop\Account)
{
$this->oActions->AuthProcess($oAccount);
@ -377,7 +375,6 @@ class Social
{
$aUserData = array(
'Email' => $oAccount->Email(),
'Login' => $oAccount->IncLogin(),
'Password' => $oAccount->Password()
);
@ -489,7 +486,6 @@ class Social
{
$aUserData = array(
'Email' => $oAccount->Email(),
'Login' => $oAccount->IncLogin(),
'Password' => $oAccount->Password()
);
@ -539,11 +535,9 @@ class Social
}
if ($aUserData && \is_array($aUserData) &&
!empty($aUserData['Email']) &&
!empty($aUserData['Login']) &&
isset($aUserData['Password']))
!empty($aUserData['Email']) && isset($aUserData['Password']))
{
$oAccount = $this->oActions->LoginProcess($aUserData['Email'], $aUserData['Login'], $aUserData['Password']);
$oAccount = $this->oActions->LoginProcess($aUserData['Email'], $aUserData['Password']);
if ($oAccount instanceof \RainLoop\Account)
{
$this->oActions->AuthProcess($oAccount);
@ -652,7 +646,6 @@ class Social
$aUserData = array(
'Email' => $oAccount->Email(),
'Login' => $oAccount->IncLogin(),
'Password' => $oAccount->Password()
);
@ -722,10 +715,9 @@ class Social
if ($aUserData && \is_array($aUserData) &&
!empty($aUserData['Email']) &&
!empty($aUserData['Login']) &&
isset($aUserData['Password']))
{
$oAccount = $this->oActions->LoginProcess($aUserData['Email'], $aUserData['Login'], $aUserData['Password']);
$oAccount = $this->oActions->LoginProcess($aUserData['Email'], $aUserData['Password']);
if ($oAccount instanceof \RainLoop\Account)
{
$this->oActions->AuthProcess($oAccount);

View file

@ -637,7 +637,7 @@
border-radius: 8px;
}
/*! normalize.css 2012-03-11T12:53 UTC - http://github.com/necolas/normalize.css */
/* =============================================================================
@ -1142,7 +1142,7 @@ table {
border-collapse: collapse;
border-spacing: 0;
}
@charset "UTF-8";
@font-face {
@ -1513,7 +1513,7 @@ table {
.icon-resize-out:before {
content: "\e06d";
}
/** initial setup **/
.nano {
/*
@ -1630,7 +1630,7 @@ table {
.nano > .pane2:hover > .slider2, .nano > .pane2.active > .slider2 {
background-color: rgba(0, 0, 0, 0.4);
}
/* Magnific Popup CSS */
.mfp-bg {
top: 0;
@ -1995,7 +1995,7 @@ img.mfp-img {
right: 0;
padding-top: 0; }
/* overlay at start */
.mfp-fade.mfp-bg {
@ -2041,7 +2041,7 @@ img.mfp-img {
-moz-transform: translateX(50px);
transform: translateX(50px);
}
.simple-pace {
-webkit-pointer-events: none;
pointer-events: none;
@ -2112,7 +2112,7 @@ img.mfp-img {
@keyframes simple-pace-stripe-animation {
0% { transform: none; transform: none; }
100% { transform: translate(-32px, 0); transform: translate(-32px, 0); }
}
}
.inputosaurus-container {
background-color:#fff;
border:1px solid #bcbec0;
@ -2180,7 +2180,7 @@ img.mfp-img {
box-shadow:none;
}
.inputosaurus-input-hidden { display:none; }
.flag-wrapper {
width: 24px;
height: 16px;
@ -2225,7 +2225,7 @@ img.mfp-img {
.flag.flag-pt-br {background-position: -192px -11px}
.flag.flag-cn, .flag.flag-zh-tw, .flag.flag-zh-cn, .flag.flag-zh-hk {background-position: -208px -22px}
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
.clearfix {
*zoom: 1;

View file

@ -78,7 +78,7 @@ var
NotificationClass = window.Notification && window.Notification.requestPermission ? window.Notification : null
;
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/*jshint onevar: false*/
@ -87,7 +87,7 @@ var
*/
var RL = null;
/*jshint onevar: true*/
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -244,7 +244,7 @@ if (Globals.bAllowPdfPreview && navigator && navigator.mimeTypes)
return oType && 'application/pdf' === oType.type;
});
}
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
Consts.Defaults = {};
@ -364,7 +364,7 @@ Consts.DataImages.UserDotPic = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA
* @type {string}
*/
Consts.DataImages.TranspPic = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQIW2NkAAIAAAoAAggA9GkAAAAASUVORK5CYII=';
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -794,7 +794,7 @@ Enums.Notification = {
'UnknownNotification': 999,
'UnknownError': 999
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
Utils.trim = $.trim;
@ -2549,7 +2549,7 @@ Utils.detectDropdownVisibility = _.debounce(function () {
return oItem.hasClass('open');
}));
}, 50);
/*jslint bitwise: true*/
// Base64 encode / decode
// http://www.webtoolkit.info/
@ -2713,7 +2713,7 @@ Base64 = {
}
};
/*jslint bitwise: false*/
/*jslint bitwise: false*/
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
ko.bindingHandlers.tooltip = {
@ -3556,7 +3556,7 @@ ko.observable.fn.validateFunc = function (fFunc)
return this;
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -3773,15 +3773,6 @@ LinkBuilder.prototype.langLink = function (sLang)
return this.sServer + '/Lang/0/' + encodeURI(sLang) + '/' + this.sVersion + '/';
};
/**
* @param {string} sHash
* @return {string}
*/
LinkBuilder.prototype.getUserPicUrlFromHash = function (sHash)
{
return this.sServer + '/Raw/' + this.sSpecSuffix + '/UserPic/' + sHash + '/' + this.sVersion + '/';
};
/**
* @return {string}
*/
@ -3880,7 +3871,7 @@ LinkBuilder.prototype.socialFacebook = function ()
{
return this.sServer + 'SocialFacebook' + ('' !== this.sSpecSuffix ? '/' + this.sSpecSuffix + '/' : '');
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -3976,7 +3967,7 @@ Plugins.settingsGet = function (sPluginSection, sName)
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -4052,7 +4043,7 @@ CookieDriver.prototype.get = function (sKey)
return mResult;
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -4125,7 +4116,7 @@ LocalStorageDriver.prototype.get = function (sKey)
return mResult;
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -4170,7 +4161,7 @@ LocalStorage.prototype.get = function (iKey)
{
return this.oDriver ? this.oDriver.get('p' + iKey) : null;
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -4185,7 +4176,7 @@ KnoinAbstractBoot.prototype.bootstart = function ()
{
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -4280,7 +4271,7 @@ KnoinAbstractViewModel.prototype.registerPopupKeyDown = function ()
return true;
});
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -4358,7 +4349,7 @@ KnoinAbstractScreen.prototype.__start = function ()
this.oCross = oRoute;
}
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -4765,7 +4756,7 @@ Knoin.prototype.bootstart = function ()
};
kn = new Knoin();
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -5131,7 +5122,7 @@ EmailModel.prototype.inputoTagLine = function ()
{
return 0 < this.name.length ? this.name + ' (' + this.email + ')' : this.email;
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -5177,7 +5168,7 @@ ContactTagModel.prototype.toLine = function (bEncodeHtml)
return (Utils.isUnd(bEncodeHtml) ? false : !!bEncodeHtml) ?
Utils.encodeHtml(this.name()) : this.name();
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -5474,7 +5465,7 @@ PopupsDomainViewModel.prototype.clearForm = function ()
this.smtpAuth(true);
this.whiteList('');
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -5613,7 +5604,7 @@ PopupsPluginViewModel.prototype.onBuild = function ()
}
}, this));
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -5731,7 +5722,7 @@ PopupsActivateViewModel.prototype.validateSubscriptionKey = function ()
{
var sValue = this.key();
return '' === sValue || !!/^RL[\d]+-[A-Z0-9\-]+Z$/.test(Utils.trim(sValue));
};
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -5793,7 +5784,7 @@ PopupsLanguagesViewModel.prototype.changeLanguage = function (sLang)
RL.data().mainLanguage(sLang);
this.cancelCommand();
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -5901,7 +5892,7 @@ PopupsAskViewModel.prototype.onBuild = function ()
}, this));
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -5990,7 +5981,7 @@ AdminLoginViewModel.prototype.onHide = function ()
{
this.loginFocus(false);
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -6016,7 +6007,7 @@ AdminMenuViewModel.prototype.link = function (sRoute)
{
return '#/' + sRoute;
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -6042,7 +6033,7 @@ AdminPaneViewModel.prototype.logoutClick = function ()
RL.remote().adminLogout(function () {
RL.loginAndLogoutReload();
});
};
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -6170,7 +6161,7 @@ AdminGeneral.prototype.phpInfoLink = function ()
return RL.link().phpInfo();
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -6217,7 +6208,7 @@ AdminLogin.prototype.onBuild = function ()
}, 50);
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -6288,7 +6279,7 @@ AdminBranding.prototype.onBuild = function ()
}, 50);
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -6510,7 +6501,7 @@ AdminContacts.prototype.onBuild = function ()
}, 50);
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -6601,7 +6592,7 @@ AdminDomains.prototype.onDomainListChangeRequest = function ()
{
RL.reloadDomainList();
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -6716,7 +6707,7 @@ AdminSecurity.prototype.phpInfoLink = function ()
{
return RL.link().phpInfo();
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -6834,7 +6825,7 @@ AdminSocial.prototype.onBuild = function ()
}, 50);
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -6933,7 +6924,7 @@ AdminPlugins.prototype.onPluginDisableRequest = function (sResult, oData)
RL.reloadPluginList();
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -7033,7 +7024,7 @@ AdminPackages.prototype.installPackage = function (oPackage)
RL.remote().packageInstall(this.requestHelper(oPackage, true), oPackage);
}
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -7090,7 +7081,7 @@ AdminLicensing.prototype.licenseExpiredMomentValue = function ()
;
return iTime && 1898625600 === iTime ? 'Never' : (oDate.format('LL') + ' (' + oDate.from(moment()) + ')');
};
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -7167,7 +7158,7 @@ AdminAbout.prototype.updateCoreData = function ()
RL.updateCoreData();
}
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -7300,7 +7291,7 @@ AbstractData.prototype.populateDataOnStart = function()
this.contactsIsAllowed(!!RL.settingsGet('ContactsIsAllowed'));
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -7353,7 +7344,7 @@ _.extend(AdminDataStorage.prototype, AbstractData.prototype);
AdminDataStorage.prototype.populateDataOnStart = function()
{
AbstractData.prototype.populateDataOnStart.call(this);
};
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -7629,7 +7620,7 @@ AbstractAjaxRemoteStorage.prototype.jsVersion = function (fCallback, sVersion)
'Version': sVersion
});
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -7892,7 +7883,7 @@ AdminAjaxRemoteStorage.prototype.adminPing = function (fCallback)
{
this.defaultRequest(fCallback, 'AdminPing');
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -7900,16 +7891,10 @@ AdminAjaxRemoteStorage.prototype.adminPing = function (fCallback)
*/
function AbstractCacheStorage()
{
this.oEmailsPicsHashes = {};
this.oServices = {};
this.bCapaGravatar = RL.capa(Enums.Capa.Gravatar);
}
/**
* @type {Object}
*/
AbstractCacheStorage.prototype.oEmailsPicsHashes = {};
/**
* @type {Object}
*/
@ -7923,7 +7908,6 @@ AbstractCacheStorage.prototype.bCapaGravatar = false;
AbstractCacheStorage.prototype.clear = function ()
{
this.oServices = {};
this.oEmailsPicsHashes = {};
};
/**
@ -7937,19 +7921,11 @@ AbstractCacheStorage.prototype.getUserPic = function (sEmail, fCallback)
var
sUrl = '',
sService = '',
sEmailLower = sEmail.toLowerCase(),
sPicHash = Utils.isUnd(this.oEmailsPicsHashes[sEmailLower]) ? '' : this.oEmailsPicsHashes[sEmailLower]
sEmailLower = sEmail.toLowerCase()
;
if ('' !== sPicHash)
{
sUrl = RL.link().getUserPicUrlFromHash(sPicHash);
}
else
{
sService = sEmailLower.substr(sEmail.indexOf('@') + 1);
sUrl = '' !== sService && this.oServices[sService] ? this.oServices[sService] : '';
}
sService = sEmailLower.substr(sEmail.indexOf('@') + 1);
sUrl = '' !== sService && this.oServices[sService] ? this.oServices[sService] : '';
if (this.bCapaGravatar && '' === sUrl && '' !== sEmailLower)
{
@ -7970,15 +7946,7 @@ AbstractCacheStorage.prototype.setServicesData = function (oData)
{
this.oServices = oData;
};
/**
* @param {Object} oData
*/
AbstractCacheStorage.prototype.setEmailsPicsHashesData = function (oData)
{
this.oEmailsPicsHashes = oData;
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -7991,7 +7959,7 @@ function AdminCacheStorage()
}
_.extend(AdminCacheStorage.prototype, AbstractCacheStorage.prototype);
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -8173,7 +8141,7 @@ AbstractSettings.prototype.routes = function ()
['', oRules]
];
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -8190,7 +8158,7 @@ _.extend(AdminLoginScreen.prototype, KnoinAbstractScreen.prototype);
AdminLoginScreen.prototype.onShow = function ()
{
RL.setTitle('');
};
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -8210,7 +8178,7 @@ _.extend(AdminSettingsScreen.prototype, AbstractSettings.prototype);
AdminSettingsScreen.prototype.onShow = function ()
{
RL.setTitle('');
};
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -8570,7 +8538,7 @@ AbstractApp.prototype.bootstart = function ()
ssm.ready();
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -8873,7 +8841,7 @@ AdminApp.prototype.bootstart = function ()
* @type {AdminApp}
*/
RL = new AdminApp();
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
$html.addClass(Globals.bMobileDevice ? 'mobile' : 'no-mobile');
@ -8926,7 +8894,7 @@ window['__RLBOOT'] = function (fCall) {
window['__RLBOOT'] = null;
});
};
if (window.SimplePace) {
window.SimplePace.add(10);
}

File diff suppressed because one or more lines are too long

View file

@ -78,7 +78,7 @@ var
NotificationClass = window.Notification && window.Notification.requestPermission ? window.Notification : null
;
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/*jshint onevar: false*/
@ -90,7 +90,7 @@ var
$proxyDiv = $('<div></div>')
;
/*jshint onevar: true*/
/*jshint onevar: true*/
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -247,7 +247,7 @@ if (Globals.bAllowPdfPreview && navigator && navigator.mimeTypes)
return oType && 'application/pdf' === oType.type;
});
}
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
Consts.Defaults = {};
@ -367,7 +367,7 @@ Consts.DataImages.UserDotPic = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA
* @type {string}
*/
Consts.DataImages.TranspPic = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQIW2NkAAIAAAoAAggA9GkAAAAASUVORK5CYII=';
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -797,7 +797,7 @@ Enums.Notification = {
'UnknownNotification': 999,
'UnknownError': 999
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
Utils.trim = $.trim;
@ -2552,7 +2552,7 @@ Utils.detectDropdownVisibility = _.debounce(function () {
return oItem.hasClass('open');
}));
}, 50);
/*jslint bitwise: true*/
// Base64 encode / decode
// http://www.webtoolkit.info/
@ -2716,7 +2716,7 @@ Base64 = {
}
};
/*jslint bitwise: false*/
/*jslint bitwise: false*/
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
ko.bindingHandlers.tooltip = {
@ -3559,7 +3559,7 @@ ko.observable.fn.validateFunc = function (fFunc)
return this;
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -3776,15 +3776,6 @@ LinkBuilder.prototype.langLink = function (sLang)
return this.sServer + '/Lang/0/' + encodeURI(sLang) + '/' + this.sVersion + '/';
};
/**
* @param {string} sHash
* @return {string}
*/
LinkBuilder.prototype.getUserPicUrlFromHash = function (sHash)
{
return this.sServer + '/Raw/' + this.sSpecSuffix + '/UserPic/' + sHash + '/' + this.sVersion + '/';
};
/**
* @return {string}
*/
@ -3883,7 +3874,7 @@ LinkBuilder.prototype.socialFacebook = function ()
{
return this.sServer + 'SocialFacebook' + ('' !== this.sSpecSuffix ? '/' + this.sSpecSuffix + '/' : '');
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -3979,7 +3970,7 @@ Plugins.settingsGet = function (sPluginSection, sName)
};
/**
* @constructor
@ -4218,7 +4209,7 @@ NewHtmlEditorWrapper.prototype.clear = function (bFocus)
this.setHtml('', bFocus);
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -4929,7 +4920,7 @@ Selector.prototype.on = function (sEventName, fCallback)
{
this.oCallbacks[sEventName] = fCallback;
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -5005,7 +4996,7 @@ CookieDriver.prototype.get = function (sKey)
return mResult;
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -5078,7 +5069,7 @@ LocalStorageDriver.prototype.get = function (sKey)
return mResult;
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -5123,7 +5114,7 @@ LocalStorage.prototype.get = function (iKey)
{
return this.oDriver ? this.oDriver.get('p' + iKey) : null;
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -5138,7 +5129,7 @@ KnoinAbstractBoot.prototype.bootstart = function ()
{
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -5233,7 +5224,7 @@ KnoinAbstractViewModel.prototype.registerPopupKeyDown = function ()
return true;
});
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -5311,7 +5302,7 @@ KnoinAbstractScreen.prototype.__start = function ()
this.oCross = oRoute;
}
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -5718,7 +5709,7 @@ Knoin.prototype.bootstart = function ()
};
kn = new Knoin();
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -6084,7 +6075,7 @@ EmailModel.prototype.inputoTagLine = function ()
{
return 0 < this.name.length ? this.name + ' (' + this.email + ')' : this.email;
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -6210,7 +6201,7 @@ ContactModel.prototype.lineAsCcc = function ()
return aResult.join(' ');
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -6241,7 +6232,7 @@ function ContactPropertyModel(iType, sTypeStr, sValue, bFocused, sPlaceholder)
}, this);
}
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -6287,7 +6278,7 @@ ContactTagModel.prototype.toLine = function (bEncodeHtml)
return (Utils.isUnd(bEncodeHtml) ? false : !!bEncodeHtml) ?
Utils.encodeHtml(this.name()) : this.name();
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -6525,7 +6516,7 @@ AttachmentModel.prototype.iconClass = function ()
return sClass;
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -6588,7 +6579,7 @@ ComposeAttachmentModel.prototype.initByUploadJson = function (oJsonAttachment)
}
return bResult;
};
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -7801,7 +7792,7 @@ MessageModel.prototype.flagHash = function ()
return [this.deleted(), this.unseen(), this.flagged(), this.answered(), this.forwarded(),
this.isReadReceipt()].join('');
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -8135,7 +8126,7 @@ FolderModel.prototype.printableFullName = function ()
{
return this.fullName.split(this.delimiter).join(' / ');
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -8158,7 +8149,7 @@ AccountModel.prototype.email = '';
AccountModel.prototype.changeAccountLink = function ()
{
return RL.link().change(this.email);
};
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -8196,7 +8187,7 @@ IdentityModel.prototype.formattedNameForEmail = function ()
var sName = this.name();
return '' === sName ? this.email() : '"' + Utils.quoteName(sName) + '" <' + this.email() + '>';
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -8246,7 +8237,7 @@ FilterActionModel.prototype.removeSelf = function ()
{
this.parentList.remove(this);
}
};
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -8297,7 +8288,7 @@ FilterConditionModel.prototype.removeSelf = function ()
this.parentList.remove(this);
}
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -8353,7 +8344,7 @@ FilterModel.prototype.parse = function (oItem)
return bResult;
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -8386,7 +8377,7 @@ OpenPgpKeyModel.prototype.user = '';
OpenPgpKeyModel.prototype.email = '';
OpenPgpKeyModel.prototype.armor = '';
OpenPgpKeyModel.prototype.isPrivate = false;
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -8484,7 +8475,7 @@ PopupsFolderClearViewModel.prototype.onShow = function (oFolder)
this.selectedFolder(oFolder);
}
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -8596,7 +8587,7 @@ PopupsFolderCreateViewModel.prototype.onFocus = function ()
{
this.folderName.focused(true);
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -8711,7 +8702,7 @@ PopupsFolderSystemViewModel.prototype.onShow = function (iNotificationType)
this.notification(sNotification);
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -10200,7 +10191,7 @@ PopupsComposeViewModel.prototype.triggerForResize = function ()
this.editorResizeThrottle();
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -10944,7 +10935,7 @@ PopupsContactsViewModel.prototype.onHide = function ()
// oItem.checked(false);
// });
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -11082,7 +11073,7 @@ PopupsAdvancedSearchViewModel.prototype.onFocus = function ()
{
this.fromFocus(true);
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -11178,7 +11169,7 @@ PopupsAddAccountViewModel.prototype.onFocus = function ()
{
this.emailFocus(true);
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -11266,7 +11257,7 @@ PopupsAddOpenPgpKeyViewModel.prototype.onFocus = function ()
{
this.key.focus(true);
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -11308,7 +11299,7 @@ PopupsViewOpenPgpKeyViewModel.prototype.onShow = function (oOpenPgpKey)
this.key(oOpenPgpKey.armor);
}
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -11405,7 +11396,7 @@ PopupsGenerateNewOpenPgpKeyViewModel.prototype.onFocus = function ()
{
this.email.focus(true);
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -11647,7 +11638,7 @@ PopupsComposeOpenPgpViewModel.prototype.onShow = function (fCallback, sText, sFr
this.to(aRec);
this.text(sText);
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -11797,7 +11788,7 @@ PopupsIdentityViewModel.prototype.onFocus = function ()
this.email.focused(true);
}
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -11859,7 +11850,7 @@ PopupsLanguagesViewModel.prototype.changeLanguage = function (sLang)
RL.data().mainLanguage(sLang);
this.cancelCommand();
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -11915,7 +11906,7 @@ PopupsTwoFactorTestViewModel.prototype.onFocus = function ()
{
this.code.focused(true);
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -12023,7 +12014,7 @@ PopupsAskViewModel.prototype.onBuild = function ()
}, this));
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -12070,7 +12061,7 @@ PopupsKeyboardShortcutsHelpViewModel.prototype.onBuild = function (oDom)
}
}, this));
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -12368,7 +12359,7 @@ LoginViewModel.prototype.selectLanguage = function ()
kn.showScreenPopup(PopupsLanguagesViewModel);
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -12466,7 +12457,7 @@ AbstractSystemDropDownViewModel.prototype.onBuild = function ()
}
});
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -12480,7 +12471,7 @@ function MailBoxSystemDropDownViewModel()
}
Utils.extendAsViewModel('MailBoxSystemDropDownViewModel', MailBoxSystemDropDownViewModel, AbstractSystemDropDownViewModel);
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -12494,7 +12485,7 @@ function SettingsSystemDropDownViewModel()
}
Utils.extendAsViewModel('SettingsSystemDropDownViewModel', SettingsSystemDropDownViewModel, AbstractSystemDropDownViewModel);
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -12744,7 +12735,7 @@ MailBoxFolderListViewModel.prototype.contactsClick = function ()
kn.showScreenPopup(PopupsContactsViewModel);
}
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -13649,7 +13640,7 @@ MailBoxMessageListViewModel.prototype.initUploaderForAppend = function ()
;
return !!oJua;
};
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -14343,7 +14334,7 @@ MailBoxMessageViewViewModel.prototype.readReceipt = function (oMessage)
RL.reloadFlagsCurrentMessageListAndMessageFromCache();
}
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -14374,7 +14365,7 @@ SettingsMenuViewModel.prototype.backToMailBoxClick = function ()
{
kn.setHash(RL.link().inbox());
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -14407,7 +14398,7 @@ SettingsPaneViewModel.prototype.backToMailBoxClick = function ()
{
kn.setHash(RL.link().inbox());
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -14569,7 +14560,7 @@ SettingsGeneral.prototype.selectLanguage = function ()
{
kn.showScreenPopup(PopupsLanguagesViewModel);
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -14621,7 +14612,7 @@ SettingsContacts.prototype.onBuild = function ()
//{
//
//};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -14704,7 +14695,7 @@ SettingsAccounts.prototype.deleteAccount = function (oAccountToRemove)
}
}
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -14794,7 +14785,7 @@ SettingsIdentity.prototype.onBuild = function ()
}, 50);
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -14954,7 +14945,7 @@ SettingsIdentities.prototype.onBuild = function (oDom)
});
}, 50);
};
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -14991,7 +14982,7 @@ SettingsFilters.prototype.addFilter = function ()
this.filters.push(oFilter);
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -15143,7 +15134,7 @@ SettingsSecurity.prototype.onBuild = function ()
this.processing(true);
RL.remote().getTwoFactor(this.onResult);
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -15212,7 +15203,7 @@ function SettingsSocialScreen()
}
Utils.addSettingsViewModel(SettingsSocialScreen, 'SettingsSocial', 'SETTINGS_LABELS/LABEL_SOCIAL_NAME', 'social');
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -15319,7 +15310,7 @@ SettingsChangePasswordScreen.prototype.onChangePasswordResponse = function (sRes
Utils.getNotification(Enums.Notification.CouldNotSaveNewPassword));
}
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -15516,7 +15507,7 @@ SettingsFolders.prototype.unSubscribeFolder = function (oFolder)
oFolder.subScribed(false);
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -15632,7 +15623,7 @@ SettingsThemes.prototype.onBuild = function ()
};
}));
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -15702,7 +15693,7 @@ SettingsOpenPGP.prototype.deleteOpenPgpKey = function (oOpenPgpKeyToRemove)
RL.reloadOpenPgpKeys();
}
}
};
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -15835,7 +15826,7 @@ AbstractData.prototype.populateDataOnStart = function()
this.contactsIsAllowed(!!RL.settingsGet('ContactsIsAllowed'));
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -17088,7 +17079,7 @@ WebMailDataStorage.prototype.findSelfPrivateKey = function (sPassword)
{
return this.findPrivateKeyByEmail(this.accountEmail(), sPassword);
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -17364,7 +17355,7 @@ AbstractAjaxRemoteStorage.prototype.jsVersion = function (fCallback, sVersion)
'Version': sVersion
});
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -18095,14 +18086,6 @@ WebMailAjaxRemoteStorage.prototype.servicesPics = function (fCallback)
this.defaultRequest(fCallback, 'ServicesPics');
};
/**
* @param {?Function} fCallback
*/
WebMailAjaxRemoteStorage.prototype.emailsPicsHashes = function (fCallback)
{
this.defaultRequest(fCallback, 'EmailsPicsHashes');
};
/**
* @param {?Function} fCallback
*/
@ -18159,7 +18142,7 @@ WebMailAjaxRemoteStorage.prototype.socialUsers = function (fCallback)
this.defaultRequest(fCallback, 'SocialUsers');
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -18167,16 +18150,10 @@ WebMailAjaxRemoteStorage.prototype.socialUsers = function (fCallback)
*/
function AbstractCacheStorage()
{
this.oEmailsPicsHashes = {};
this.oServices = {};
this.bCapaGravatar = RL.capa(Enums.Capa.Gravatar);
}
/**
* @type {Object}
*/
AbstractCacheStorage.prototype.oEmailsPicsHashes = {};
/**
* @type {Object}
*/
@ -18190,7 +18167,6 @@ AbstractCacheStorage.prototype.bCapaGravatar = false;
AbstractCacheStorage.prototype.clear = function ()
{
this.oServices = {};
this.oEmailsPicsHashes = {};
};
/**
@ -18204,19 +18180,11 @@ AbstractCacheStorage.prototype.getUserPic = function (sEmail, fCallback)
var
sUrl = '',
sService = '',
sEmailLower = sEmail.toLowerCase(),
sPicHash = Utils.isUnd(this.oEmailsPicsHashes[sEmailLower]) ? '' : this.oEmailsPicsHashes[sEmailLower]
sEmailLower = sEmail.toLowerCase()
;
if ('' !== sPicHash)
{
sUrl = RL.link().getUserPicUrlFromHash(sPicHash);
}
else
{
sService = sEmailLower.substr(sEmail.indexOf('@') + 1);
sUrl = '' !== sService && this.oServices[sService] ? this.oServices[sService] : '';
}
sService = sEmailLower.substr(sEmail.indexOf('@') + 1);
sUrl = '' !== sService && this.oServices[sService] ? this.oServices[sService] : '';
if (this.bCapaGravatar && '' === sUrl && '' !== sEmailLower)
{
@ -18237,15 +18205,7 @@ AbstractCacheStorage.prototype.setServicesData = function (oData)
{
this.oServices = oData;
};
/**
* @param {Object} oData
*/
AbstractCacheStorage.prototype.setEmailsPicsHashesData = function (oData)
{
this.oEmailsPicsHashes = oData;
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -18565,7 +18525,7 @@ WebMailCacheStorage.prototype.storeMessageFlagsToCacheByFolderAndUid = function
this.setMessageFlagsToCache(sFolder, sUid, aFlags);
}
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -18747,7 +18707,7 @@ AbstractSettings.prototype.routes = function ()
['', oRules]
];
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -18764,7 +18724,7 @@ _.extend(LoginScreen.prototype, KnoinAbstractScreen.prototype);
LoginScreen.prototype.onShow = function ()
{
RL.setTitle('');
};
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -18937,7 +18897,7 @@ MailBoxScreen.prototype.routes = function ()
[/^([^\/]*)$/, {'normalize_': fNormS}]
];
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -18966,7 +18926,7 @@ SettingsScreen.prototype.onShow = function ()
RL.setTitle(this.sSettingsTitle);
RL.data().keyScope(Enums.KeyState.Settings);
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -19326,7 +19286,7 @@ AbstractApp.prototype.bootstart = function ()
ssm.ready();
};
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
@ -20314,16 +20274,6 @@ RainLoopApp.prototype.getContactsTagsAutocomplete = function (sQuery, fCallback)
}));
};
RainLoopApp.prototype.emailsPicsHashes = function ()
{
RL.remote().emailsPicsHashes(function (sResult, oData) {
if (Enums.StorageResultType.Success === sResult && oData && oData.Result)
{
RL.cache().setEmailsPicsHashesData(oData.Result);
}
});
};
/**
* @param {string} sMailToUrl
* @returns {boolean}
@ -20519,8 +20469,6 @@ RainLoopApp.prototype.bootstart = function ()
_.delay(function () {
RL.emailsPicsHashes();
RL.remote().servicesPics(function (sResult, oData) {
if (Enums.StorageResultType.Success === sResult && oData && oData.Result)
{
@ -20635,7 +20583,7 @@ RainLoopApp.prototype.bootstart = function ()
* @type {RainLoopApp}
*/
RL = new RainLoopApp();
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
$html.addClass(Globals.bMobileDevice ? 'mobile' : 'no-mobile');
@ -20688,7 +20636,7 @@ window['__RLBOOT'] = function (fCall) {
window['__RLBOOT'] = null;
});
};
if (window.SimplePace) {
window.SimplePace.add(10);
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long