mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-25 10:09:20 +03:00
1.10.4.181
This commit is contained in:
parent
f70d9e46a0
commit
224362299a
11 changed files with 4301 additions and 4288 deletions
|
|
@ -9,7 +9,7 @@ const Base64 = {
|
||||||
|
|
||||||
// public method for urlsafe encoding
|
// public method for urlsafe encoding
|
||||||
urlsafe_encode: (input) => Base64.encode(input)
|
urlsafe_encode: (input) => Base64.encode(input)
|
||||||
.replace(/[+]/g, '-').replace(/[\/]/g, '_').replace(/[=]/g, '.'),
|
.replace(/[+]/g, '-').replace(/[\/]/g, '_').replace(/[=]/g, ''),
|
||||||
|
|
||||||
// public method for encoding
|
// public method for encoding
|
||||||
encode: (input) => {
|
encode: (input) => {
|
||||||
|
|
|
||||||
|
|
@ -182,3 +182,13 @@
|
||||||
z-index: 1052;
|
z-index: 1052;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.btn-submit-icon-wrp {
|
||||||
|
border: none;
|
||||||
|
background: none;
|
||||||
|
display: inline-block;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
outline: none;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
6
npm-shrinkwrap.json
generated
6
npm-shrinkwrap.json
generated
|
|
@ -3125,9 +3125,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"moment": {
|
"moment": {
|
||||||
"version": "2.15.0",
|
"version": "2.15.1",
|
||||||
"from": "moment@2.15.0",
|
"from": "moment@2.15.1",
|
||||||
"resolved": "https://registry.npmjs.org/moment/-/moment-2.15.0.tgz"
|
"resolved": "https://registry.npmjs.org/moment/-/moment-2.15.1.tgz"
|
||||||
},
|
},
|
||||||
"ms": {
|
"ms": {
|
||||||
"version": "0.7.1",
|
"version": "0.7.1",
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,8 @@
|
||||||
"description": "Simple, modern & fast web-based email client",
|
"description": "Simple, modern & fast web-based email client",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "1.10.4",
|
"version": "1.10.4",
|
||||||
"release": "180",
|
"release": "181",
|
||||||
"ownCloudPackageVersion": "4.24",
|
"ownCloudPackageVersion": "4.25",
|
||||||
"homepage": "http://rainloop.net",
|
"homepage": "http://rainloop.net",
|
||||||
"main": "gulpfile.js",
|
"main": "gulpfile.js",
|
||||||
"author": {
|
"author": {
|
||||||
|
|
@ -99,7 +99,7 @@
|
||||||
"knockout-sortable": "^0.14.1",
|
"knockout-sortable": "^0.14.1",
|
||||||
"lightgallery": "^1.2.21",
|
"lightgallery": "^1.2.21",
|
||||||
"matchmedia-polyfill": "^0.3.0",
|
"matchmedia-polyfill": "^0.3.0",
|
||||||
"moment": "^2.15.0",
|
"moment": "^2.15.1",
|
||||||
"node-fs": "^0.1.7",
|
"node-fs": "^0.1.7",
|
||||||
"node-notifier": "4.6.1",
|
"node-notifier": "4.6.1",
|
||||||
"normalize.css": "^4.2.0",
|
"normalize.css": "^4.2.0",
|
||||||
|
|
|
||||||
|
|
@ -1,189 +1,189 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This file is part of MailSo.
|
* This file is part of MailSo.
|
||||||
*
|
*
|
||||||
* (c) 2014 Usenko Timur
|
* (c) 2014 Usenko Timur
|
||||||
*
|
*
|
||||||
* For the full copyright and license information, please view the LICENSE
|
* For the full copyright and license information, please view the LICENSE
|
||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace MailSo\Base;
|
namespace MailSo\Base;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @category MailSo
|
* @category MailSo
|
||||||
* @package Base
|
* @package Base
|
||||||
*/
|
*/
|
||||||
class Crypt
|
class Crypt
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param string $sString
|
* @param string $sString
|
||||||
* @param string $sKey
|
* @param string $sKey
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function XxteaEncrypt($sString, $sKey)
|
public static function XxteaEncrypt($sString, $sKey)
|
||||||
{
|
{
|
||||||
if (0 === \strlen($sString))
|
if (0 === \strlen($sString))
|
||||||
{
|
{
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
$aV = self::str2long($sString, true);
|
$aV = self::str2long($sString, true);
|
||||||
$aK = self::str2long($sKey, false);
|
$aK = self::str2long($sKey, false);
|
||||||
if (\count($aK) < 4)
|
if (\count($aK) < 4)
|
||||||
{
|
{
|
||||||
for ($iIndex = \count($aK); $iIndex < 4; $iIndex++)
|
for ($iIndex = \count($aK); $iIndex < 4; $iIndex++)
|
||||||
{
|
{
|
||||||
$aK[$iIndex] = 0;
|
$aK[$iIndex] = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$iN = \count($aV) - 1;
|
$iN = \count($aV) - 1;
|
||||||
|
|
||||||
$iZ = $aV[$iN];
|
$iZ = $aV[$iN];
|
||||||
$iY = $aV[0];
|
$iY = $aV[0];
|
||||||
$iDelta = 0x9E3779B9;
|
$iDelta = 0x9E3779B9;
|
||||||
$iQ = \floor(6 + 52 / ($iN + 1));
|
$iQ = \floor(6 + 52 / ($iN + 1));
|
||||||
$iSum = 0;
|
$iSum = 0;
|
||||||
while (0 < $iQ--)
|
while (0 < $iQ--)
|
||||||
{
|
{
|
||||||
$iSum = self::int32($iSum + $iDelta);
|
$iSum = self::int32($iSum + $iDelta);
|
||||||
$iE = $iSum >> 2 & 3;
|
$iE = $iSum >> 2 & 3;
|
||||||
for ($iPIndex = 0; $iPIndex < $iN; $iPIndex++)
|
for ($iPIndex = 0; $iPIndex < $iN; $iPIndex++)
|
||||||
{
|
{
|
||||||
$iY = $aV[$iPIndex + 1];
|
$iY = $aV[$iPIndex + 1];
|
||||||
$iMx = self::int32((($iZ >> 5 & 0x07ffffff) ^ $iY << 2) +
|
$iMx = self::int32((($iZ >> 5 & 0x07ffffff) ^ $iY << 2) +
|
||||||
(($iY >> 3 & 0x1fffffff) ^ $iZ << 4)) ^ self::int32(($iSum ^ $iY) + ($aK[$iPIndex & 3 ^ $iE] ^ $iZ));
|
(($iY >> 3 & 0x1fffffff) ^ $iZ << 4)) ^ self::int32(($iSum ^ $iY) + ($aK[$iPIndex & 3 ^ $iE] ^ $iZ));
|
||||||
$iZ = $aV[$iPIndex] = self::int32($aV[$iPIndex] + $iMx);
|
$iZ = $aV[$iPIndex] = self::int32($aV[$iPIndex] + $iMx);
|
||||||
}
|
}
|
||||||
$iY = $aV[0];
|
$iY = $aV[0];
|
||||||
$iMx = self::int32((($iZ >> 5 & 0x07ffffff) ^ $iY << 2) +
|
$iMx = self::int32((($iZ >> 5 & 0x07ffffff) ^ $iY << 2) +
|
||||||
(($iY >> 3 & 0x1fffffff) ^ $iZ << 4)) ^ self::int32(($iSum ^ $iY) + ($aK[$iPIndex & 3 ^ $iE] ^ $iZ));
|
(($iY >> 3 & 0x1fffffff) ^ $iZ << 4)) ^ self::int32(($iSum ^ $iY) + ($aK[$iPIndex & 3 ^ $iE] ^ $iZ));
|
||||||
$iZ = $aV[$iN] = self::int32($aV[$iN] + $iMx);
|
$iZ = $aV[$iN] = self::int32($aV[$iN] + $iMx);
|
||||||
}
|
}
|
||||||
|
|
||||||
return self::long2str($aV, false);
|
return self::long2str($aV, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $sEncriptedString
|
* @param string $sEncriptedString
|
||||||
* @param string $sKey
|
* @param string $sKey
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function XxteaDecrypt($sEncriptedString, $sKey)
|
public static function XxteaDecrypt($sEncriptedString, $sKey)
|
||||||
{
|
{
|
||||||
if (0 === \strlen($sEncriptedString))
|
if (0 === \strlen($sEncriptedString))
|
||||||
{
|
{
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
$aV = self::str2long($sEncriptedString, false);
|
$aV = self::str2long($sEncriptedString, false);
|
||||||
$aK = self::str2long($sKey, false);
|
$aK = self::str2long($sKey, false);
|
||||||
|
|
||||||
if (\count($aK) < 4)
|
if (\count($aK) < 4)
|
||||||
{
|
{
|
||||||
for ($iIndex = \count($aK); $iIndex < 4; $iIndex++)
|
for ($iIndex = \count($aK); $iIndex < 4; $iIndex++)
|
||||||
{
|
{
|
||||||
$aK[$iIndex] = 0;
|
$aK[$iIndex] = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$iN = \count($aV) - 1;
|
$iN = \count($aV) - 1;
|
||||||
|
|
||||||
$iZ = $aV[$iN];
|
$iZ = $aV[$iN];
|
||||||
$iY = $aV[0];
|
$iY = $aV[0];
|
||||||
$iDelta = 0x9E3779B9;
|
$iDelta = 0x9E3779B9;
|
||||||
$iQ = \floor(6 + 52 / ($iN + 1));
|
$iQ = \floor(6 + 52 / ($iN + 1));
|
||||||
$iSum = self::int32($iQ * $iDelta);
|
$iSum = self::int32($iQ * $iDelta);
|
||||||
while ($iSum != 0)
|
while ($iSum != 0)
|
||||||
{
|
{
|
||||||
$iE = $iSum >> 2 & 3;
|
$iE = $iSum >> 2 & 3;
|
||||||
for ($iPIndex = $iN; $iPIndex > 0; $iPIndex--)
|
for ($iPIndex = $iN; $iPIndex > 0; $iPIndex--)
|
||||||
{
|
{
|
||||||
$iZ = $aV[$iPIndex - 1];
|
$iZ = $aV[$iPIndex - 1];
|
||||||
$iMx = self::int32((($iZ >> 5 & 0x07ffffff) ^ $iY << 2) +
|
$iMx = self::int32((($iZ >> 5 & 0x07ffffff) ^ $iY << 2) +
|
||||||
(($iY >> 3 & 0x1fffffff) ^ $iZ << 4)) ^ self::int32(($iSum ^ $iY) + ($aK[$iPIndex & 3 ^ $iE] ^ $iZ));
|
(($iY >> 3 & 0x1fffffff) ^ $iZ << 4)) ^ self::int32(($iSum ^ $iY) + ($aK[$iPIndex & 3 ^ $iE] ^ $iZ));
|
||||||
$iY = $aV[$iPIndex] = self::int32($aV[$iPIndex] - $iMx);
|
$iY = $aV[$iPIndex] = self::int32($aV[$iPIndex] - $iMx);
|
||||||
}
|
}
|
||||||
$iZ = $aV[$iN];
|
$iZ = $aV[$iN];
|
||||||
$iMx = self::int32((($iZ >> 5 & 0x07ffffff) ^ $iY << 2) +
|
$iMx = self::int32((($iZ >> 5 & 0x07ffffff) ^ $iY << 2) +
|
||||||
(($iY >> 3 & 0x1fffffff) ^ $iZ << 4)) ^ self::int32(($iSum ^ $iY) + ($aK[$iPIndex & 3 ^ $iE] ^ $iZ));
|
(($iY >> 3 & 0x1fffffff) ^ $iZ << 4)) ^ self::int32(($iSum ^ $iY) + ($aK[$iPIndex & 3 ^ $iE] ^ $iZ));
|
||||||
$iY = $aV[0] = self::int32($aV[0] - $iMx);
|
$iY = $aV[0] = self::int32($aV[0] - $iMx);
|
||||||
$iSum = self::int32($iSum - $iDelta);
|
$iSum = self::int32($iSum - $iDelta);
|
||||||
}
|
}
|
||||||
|
|
||||||
return self::long2str($aV, true);
|
return self::long2str($aV, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param array $aV
|
* @param array $aV
|
||||||
* @param array $aW
|
* @param array $aW
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
private static function long2str($aV, $aW)
|
private static function long2str($aV, $aW)
|
||||||
{
|
{
|
||||||
$iLen = \count($aV);
|
$iLen = \count($aV);
|
||||||
$iN = ($iLen - 1) << 2;
|
$iN = ($iLen - 1) << 2;
|
||||||
if ($aW)
|
if ($aW)
|
||||||
{
|
{
|
||||||
$iM = $aV[$iLen - 1];
|
$iM = $aV[$iLen - 1];
|
||||||
if (($iM < $iN - 3) || ($iM > $iN))
|
if (($iM < $iN - 3) || ($iM > $iN))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$iN = $iM;
|
$iN = $iM;
|
||||||
}
|
}
|
||||||
$aS = array();
|
$aS = array();
|
||||||
for ($iIndex = 0; $iIndex < $iLen; $iIndex++)
|
for ($iIndex = 0; $iIndex < $iLen; $iIndex++)
|
||||||
{
|
{
|
||||||
$aS[$iIndex] = \pack('V', $aV[$iIndex]);
|
$aS[$iIndex] = \pack('V', $aV[$iIndex]);
|
||||||
}
|
}
|
||||||
if ($aW)
|
if ($aW)
|
||||||
{
|
{
|
||||||
return \substr(\join('', $aS), 0, $iN);
|
return \substr(\join('', $aS), 0, $iN);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return \join('', $aS);
|
return \join('', $aS);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $sS
|
* @param string $sS
|
||||||
* @param string $sW
|
* @param string $sW
|
||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
private static function str2long($sS, $sW)
|
private static function str2long($sS, $sW)
|
||||||
{
|
{
|
||||||
$aV = \unpack('V*', $sS . \str_repeat("\0", (4 - \strlen($sS) % 4) & 3));
|
$aV = \unpack('V*', $sS . \str_repeat("\0", (4 - \strlen($sS) % 4) & 3));
|
||||||
$aV = \array_values($aV);
|
$aV = \array_values($aV);
|
||||||
if ($sW)
|
if ($sW)
|
||||||
{
|
{
|
||||||
$aV[\count($aV)] = \strlen($sS);
|
$aV[\count($aV)] = \strlen($sS);
|
||||||
}
|
}
|
||||||
return $aV;
|
return $aV;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param int $iN
|
* @param int $iN
|
||||||
*
|
*
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
private static function int32($iN)
|
private static function int32($iN)
|
||||||
{
|
{
|
||||||
while ($iN >= 2147483648)
|
while ($iN >= 2147483648)
|
||||||
{
|
{
|
||||||
$iN -= 4294967296;
|
$iN -= 4294967296;
|
||||||
}
|
}
|
||||||
while ($iN <= -2147483649)
|
while ($iN <= -2147483649)
|
||||||
{
|
{
|
||||||
$iN += 4294967296;
|
$iN += 4294967296;
|
||||||
}
|
}
|
||||||
return (int) $iN;
|
return (int) $iN;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1721,7 +1721,7 @@ END;
|
||||||
*/
|
*/
|
||||||
public static function UrlSafeBase64Encode($sValue)
|
public static function UrlSafeBase64Encode($sValue)
|
||||||
{
|
{
|
||||||
return \rtrim(\strtr(\base64_encode(\trim($sValue)), '+/', '-_'), '=');
|
return \rtrim(\strtr(\base64_encode($sValue), '+/', '-_'), '=');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -1732,7 +1732,7 @@ END;
|
||||||
public static function UrlSafeBase64Decode($sValue)
|
public static function UrlSafeBase64Decode($sValue)
|
||||||
{
|
{
|
||||||
$sValue = \rtrim(\strtr($sValue, '-_.', '+/='), '=');
|
$sValue = \rtrim(\strtr($sValue, '-_.', '+/='), '=');
|
||||||
return \MailSo\Base\Utils::Base64Decode(\str_pad($sValue, \strlen($sValue) % 4, '=', STR_PAD_RIGHT));
|
return \MailSo\Base\Utils::Base64Decode(\str_pad($sValue, \strlen($sValue) + (\strlen($sValue) % 4), '=', STR_PAD_RIGHT));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
|
@ -26,9 +26,11 @@
|
||||||
style="padding-right: 35px;"
|
style="padding-right: 35px;"
|
||||||
autocorrect="off" autocapitalize="off" spellcheck="false" data-i18n="[placeholder]LOGIN/LABEL_PASSWORD"
|
autocorrect="off" autocapitalize="off" spellcheck="false" data-i18n="[placeholder]LOGIN/LABEL_PASSWORD"
|
||||||
data-bind="textInput: password, disable: submitRequest" />
|
data-bind="textInput: password, disable: submitRequest" />
|
||||||
<span class="add-on" data-bind="command: submitCommand">
|
<span class="add-on" data-bind="command: submitCommand, tooltip: 'LOGIN/BUTTON_LOGIN'">
|
||||||
<i class="icon-key" data-bind="visible: '' === password()"></i>
|
<i class="icon-key" data-bind="visible: '' === password()"></i>
|
||||||
<i class="icon-right-middle login-submit-icon" data-bind="visible: '' !== password()"></i>
|
<button type="submit" class="btn-submit-icon-wrp" data-bind="visible: '' !== password()">
|
||||||
|
<i class="icon-right-middle login-submit-icon"></i>
|
||||||
|
</button>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,9 @@
|
||||||
data-bind="textInput: password, hasFocus: passwordFocus, disable: submitRequest" data-i18n="[placeholder]LOGIN/LABEL_PASSWORD" />
|
data-bind="textInput: password, hasFocus: passwordFocus, disable: submitRequest" data-i18n="[placeholder]LOGIN/LABEL_PASSWORD" />
|
||||||
<span class="add-on i18n" data-bind="command: submitCommand, tooltip: 'LOGIN/BUTTON_SIGN_IN'">
|
<span class="add-on i18n" data-bind="command: submitCommand, tooltip: 'LOGIN/BUTTON_SIGN_IN'">
|
||||||
<i class="icon-key" data-bind="visible: '' === password()"></i>
|
<i class="icon-key" data-bind="visible: '' === password()"></i>
|
||||||
<i class="icon-right-middle login-submit-icon" data-bind="visible: '' !== password()"></i>
|
<button type="submit" class="btn-submit-icon-wrp" data-bind="visible: '' !== password()">
|
||||||
|
<i class="icon-right-middle login-submit-icon"></i>
|
||||||
|
</button>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -80,22 +80,21 @@
|
||||||
</a>
|
</a>
|
||||||
<ul class="dropdown-menu g-ui-menu" role="menu" aria-labelledby="more-view-dropdown-id">
|
<ul class="dropdown-menu g-ui-menu" role="menu" aria-labelledby="more-view-dropdown-id">
|
||||||
<div data-bind="visible: allowComposer && !isDraftFolder()">
|
<div data-bind="visible: allowComposer && !isDraftFolder()">
|
||||||
<li class="e-item" role="presentation" data-bind="visible: 'reply' !== lastReplyAction()">
|
<li class="e-item" role="presentation">
|
||||||
<a class="e-link menuitem" href="#" tabindex="-1" data-bind="command: replyCommand">
|
<a class="e-link menuitem" href="#" tabindex="-1" data-bind="command: replyCommand">
|
||||||
<i class="icon-reply"></i>
|
<i class="icon-reply"></i>
|
||||||
|
|
||||||
<span class="i18n" data-i18n="MESSAGE/BUTTON_REPLY"></span>
|
<span class="i18n" data-i18n="MESSAGE/BUTTON_REPLY"></span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="e-item" role="presentation" data-bind="visible: 'replyall' !== lastReplyAction()">
|
<li class="e-item" role="presentation">
|
||||||
<a class="e-link menuitem" href="#" tabindex="-1" data-bind="command: replyAllCommand">
|
<a class="e-link menuitem" href="#" tabindex="-1" data-bind="command: replyAllCommand">
|
||||||
<i class="icon-reply-all"></i>
|
<i class="icon-reply-all"></i>
|
||||||
|
|
||||||
<span class="i18n" data-i18n="MESSAGE/BUTTON_REPLY_ALL"></span>
|
<span class="i18n" data-i18n="MESSAGE/BUTTON_REPLY_ALL"></span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="e-item" role="presentation"
|
<li class="e-item" role="presentation">
|
||||||
data-bind="visible: 'forward' !== lastReplyAction()">
|
|
||||||
<a class="e-link menuitem" href="#" tabindex="-1" data-bind="command: forwardCommand">
|
<a class="e-link menuitem" href="#" tabindex="-1" data-bind="command: forwardCommand">
|
||||||
<i class="icon-forward"></i>
|
<i class="icon-forward"></i>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue