mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-07 16:37:02 +03:00
Many fixes
New ownCloud package with a built-in webmail
This commit is contained in:
parent
323dd34c8b
commit
6116597f6f
56 changed files with 1137 additions and 232 deletions
|
|
@ -263,7 +263,6 @@ class Http
|
|||
*/
|
||||
public function GetHeader($sHeader)
|
||||
{
|
||||
$sResultHeader = '';
|
||||
$sServerKey = 'HTTP_'.\strtoupper(\str_replace('-', '_', $sHeader));
|
||||
$sResultHeader = $this->GetServer($sServerKey, '');
|
||||
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ class SubStreams
|
|||
\stream_wrapper_register(self::STREAM_NAME, '\MailSo\Base\StreamWrappers\SubStreams');
|
||||
}
|
||||
|
||||
$sHashName = \md5(\microtime(true).\rand(1000, 9999));
|
||||
$sHashName = \MailSo\Base\Utils::Md5Rand();
|
||||
|
||||
self::$aStreams[$sHashName] = $aSubStreams;
|
||||
|
||||
|
|
@ -84,7 +84,7 @@ class SubStreams
|
|||
{
|
||||
return $this->aSubStreams[$this->iIndex];
|
||||
}
|
||||
|
||||
|
||||
return $nNull;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2147,6 +2147,28 @@ class Utils
|
|||
return \is_string($mResult) && 0 < \strlen($mResult) ? $mResult : '';
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $sAdditionalSalt = ''
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function Md5Rand($sAdditionalSalt = '')
|
||||
{
|
||||
return \md5(\microtime(true).\rand(10000, 99999).
|
||||
\md5($sAdditionalSalt).\rand(10000, 99999).\microtime(true));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $sAdditionalSalt = ''
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function Sha1Rand($sAdditionalSalt = '')
|
||||
{
|
||||
return \sha1(\microtime(true).\rand(10000, 99999).
|
||||
\sha1($sAdditionalSalt).\rand(10000, 99999).\microtime(true));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $sData
|
||||
* @param string $sKey
|
||||
|
|
|
|||
|
|
@ -121,7 +121,7 @@ class Logger extends \MailSo\Base\Collection
|
|||
static $sCache = null;
|
||||
if (null === $sCache)
|
||||
{
|
||||
$sCache = \substr(\md5(\microtime(true).\rand(10000, 99999)), -8);
|
||||
$sCache = \substr(\MailSo\Base\Utils::Md5Rand(), -8);
|
||||
}
|
||||
|
||||
return $sCache;
|
||||
|
|
|
|||
|
|
@ -990,7 +990,7 @@ class MailClient
|
|||
{
|
||||
do
|
||||
{
|
||||
$sKey = \md5(\rand(10000, 90000).\microtime(true));
|
||||
$sKey = \MailSo\Base\Utils::Md5Rand();
|
||||
}
|
||||
while (isset($aCache[$sKey]));
|
||||
|
||||
|
|
@ -1006,7 +1006,7 @@ class MailClient
|
|||
{
|
||||
do
|
||||
{
|
||||
$sKey = \md5(\rand(10000, 90000).\microtime(true));
|
||||
$sKey = \MailSo\Base\Utils::Md5Rand();
|
||||
}
|
||||
while (isset($aCache[$sKey]));
|
||||
|
||||
|
|
|
|||
|
|
@ -535,8 +535,9 @@ class Message
|
|||
$sHostName = 'localhost';
|
||||
}
|
||||
|
||||
return '<'.\md5(\rand(100000, 999999).\time().$sHostName.
|
||||
(\MailSo\Base\Utils::FunctionExistsAndEnabled('getmypid') ? @\getmypid() : '')).'@'.$sHostName.'>';
|
||||
return '<'.
|
||||
\MailSo\Base\Utils::Md5Rand($sHostName.
|
||||
(\MailSo\Base\Utils::FunctionExistsAndEnabled('getmypid') ? @\getmypid() : '')).'@'.$sHostName.'>';
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue