HomePhabricator

Bug 589: make random selection slightly more random. PHP's mt_rand() function…
2a03980093b5Unpublished

Authored by Wil Mahan <wmahan@users.mediawiki.org>.

Unpublished Commit · Learn More

Repository Importing: This repository is still importing.

Description

Bug 589: make random selection slightly more random. PHP's mt_rand() function has a maximum value of 2^31-1, which is small enough that duplicate values can occur due to the Birthday paradox, e.g. on the English Wikipedia. To fix this, add a wfRandom() function that calls mt_rand() twice to get the desired amount of randomness.

Details

Committed
Wil MahanOct 11 2004, 5:34 PM
Parents
rMWa2f8c159a9d4: Detect and disallow &gt; and &lt; within external links. Fixes bug 289.
Branches
Unknown
Tags
Unknown
ChangeId
None