Make WordPress Core


Ignore:
Timestamp:
10/09/2015 04:27:41 AM (9 years ago)
Author:
dd32
Message:

Use PHP7's random_int() CSPRNG functionality in wp_rand() with a fallback to the random_compat library for PHP 5.x.
random_compat offers a set of compatible functions for older versions of PHP, filling in the gap by using other PHP extensions when available.
We still include our existing wp_rand() functionality as a fallback for when no proper CSPRNG exists on the system.

Take Two, this was previously committed in [34922] but had an issue on PHP 5.2 which sarciszewski has now resolved.

Props sarciszewski
See #28633

Location:
trunk/src/wp-includes/random_compat
Files:
1 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/random_compat/error_polyfill.php

    r34922 r34981  
    3030    interface Throwable
    3131    {
    32         public function getMessage();
    33         public function getCode();
    34         public function getFile();
    35         public function getLine();
    36         public function getTrace();
    37         public function getTraceAsString();
    38         public function getPrevious();
    39         public function __toString();
    4032    }
    4133}
Note: See TracChangeset for help on using the changeset viewer.