mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-07 08:27:03 +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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue