jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/372364 )
Change subject: Replaced mt_rand() with MWCryptRand
......................................................................
Replaced mt_rand() with MWCryptRand
When creating a random temp directory, SecurePoll should use MWCryptRand
instead of mt_rand().
Bug: T173390
Change-Id: I582dffaba09ac31454f514a869940ed75cc7159a
---
M includes/crypt/Crypt.php
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
Brian Wolff: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/crypt/Crypt.php b/includes/crypt/Crypt.php
index 6bb5761..e166ccc 100644
--- a/includes/crypt/Crypt.php
+++ b/includes/crypt/Crypt.php
@@ -162,7 +162,7 @@
}
# Create the directory
- $this->homeDir = $wgSecurePollTempDir . '/securepoll-' . sha1(
mt_rand() . mt_rand() );
+ $this->homeDir = $wgSecurePollTempDir . '/securepoll-' .
MWCryptRand::generateHex( 40 );
if ( !mkdir( $this->homeDir ) ) {
$this->homeDir = null;
return Status::newFatal( 'securepoll-no-gpg-home' );
--
To view, visit https://gerrit.wikimedia.org/r/372364
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I582dffaba09ac31454f514a869940ed75cc7159a
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/SecurePoll
Gerrit-Branch: master
Gerrit-Owner: Wassan.anmol <[email protected]>
Gerrit-Reviewer: Brian Wolff <[email protected]>
Gerrit-Reviewer: Huji <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits