Skip to content

Commit

Permalink
revert e91177d
Browse files Browse the repository at this point in the history
  • Loading branch information
frankmayer committed Dec 12, 2016
1 parent d367a4a commit 3dc16d6
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion libraries/cms/html/email.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public static function cloak($mail, $mailto = true, $text = '', $email = true)
$mail = static::convertEncoding($mail);

// Random hash
$rand = md5($mail . rand(1, 100000));
$rand = md5($mail . mt_rand(1, 100000));

// Split email by @ symbol
$mail = explode('@', $mail);
Expand Down
2 changes: 1 addition & 1 deletion libraries/joomla/user/helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,7 @@ public static function getSalt($encryption = 'md5-hex', $seed = '', $plaintext =

for ($i = 0; $i < 8; $i++)
{
$salt .= $APRMD5{rand(0, 63)};
$salt .= $APRMD5{mt_rand(0, 63)};
}

return $salt;
Expand Down
2 changes: 1 addition & 1 deletion plugins/twofactorauth/yubikey/yubikey.php
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ public function validateYubikeyOtp($otp)

$http = JHttpFactory::getHttp();
$token = JSession::getFormToken();
$nonce = md5($token . uniqid(rand()));
$nonce = md5($token . uniqid(mt_rand()));

while (!$gotResponse && !empty($server_queue))
{
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/suites/libraries/cms/html/JHtmlBehaviorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ protected function setUp()
// We generate a random template name so that we don't collide or hit anything
JFactory::$application->expects($this->any())
->method('getTemplate')
->willReturn('mytemplate' . rand(1, 10000));
->willReturn('mytemplate' . mt_rand(1, 10000));

$this->backupServer = $_SERVER;

Expand Down
8 changes: 4 additions & 4 deletions tests/unit/suites/libraries/cms/html/JHtmlTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ public function testImage()
$urlfilename = 'image1.jpg';

// We generate a random template name so that we don't collide or hit anything.
$template = 'mytemplate' . rand(1, 10000);
$template = 'mytemplate' . mt_rand(1, 10000);

// We create a stub (not a mock because we don't enforce whether it is called or not)
// to return a value from getTemplate.
Expand Down Expand Up @@ -583,7 +583,7 @@ public function testScript()
$urlfilename = 'script1.js';

// We generate a random template name so that we don't collide or hit anything.
$template = 'mytemplate' . rand(1, 10000);
$template = 'mytemplate' . mt_rand(1, 10000);

// We create a stub (not a mock because we don't enforce whether it is called or not)
// to return a value from getTemplate.
Expand Down Expand Up @@ -926,7 +926,7 @@ public function testStylesheet()
$urlfilename = 'style1.css';

// We generate a random template name so that we don't collide or hit anything.
$template = 'mytemplate' . rand(1, 10000);
$template = 'mytemplate' . mt_rand(1, 10000);

// We create a stub (not a mock because we don't enforce whether it is called or not)
// to return a value from getTemplate.
Expand Down Expand Up @@ -1301,7 +1301,7 @@ public function testStylesheet()
public function testTooltip()
{
// We generate a random template name so that we don't collide or hit anything
$template = 'mytemplate' . rand(1, 10000);
$template = 'mytemplate' . mt_rand(1, 10000);

// We create a stub (not a mock because we don't enforce whether it is called or not)
// to return a value from getTemplate
Expand Down

0 comments on commit 3dc16d6

Please sign in to comment.