? Success

User tests: Successful: Unsuccessful:

avatar mbabker
mbabker
9 Nov 2015

Frankly I have no idea if this is right or backward compatible, but it worked in the one test case I ran through.

As suggested, this PR implements the random_compat backfill and replaces the contents of JCrypt::genRandomBytes() with a proxied call to the random_bytes() function added to PHP 7 (and backfilled by this library).

The quickest test cases to validate this works is to run through the installer; the config's secret value should still be generated. Also, the stats plugin indirectly calls this method to generate its hash and that should continue to be generated.

avatar mbabker mbabker - open - 9 Nov 2015
avatar mbabker mbabker - change - 9 Nov 2015
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 9 Nov 2015
Labels Added: ?
avatar paragonie-scott
paragonie-scott - comment - 9 Nov 2015

Frankly I have no idea if this is right or backward compatible, but it worked in the one test case I ran through.

Backwards compatible: Since random_compat is a polyfill library, it's the one library where we deemed it acceptable to support ancient versions of PHP (yes, even 5.2.x). As a result, WordPress is adopting it in 4.4.

The patch looks good to me, but I'm one of the authors of the polyfill, so I'd definitely suggest asking any security researchers you've communicated with to share their thoughts first.

avatar zero-24 zero-24 - change - 9 Nov 2015
Category Libraries
avatar wilsonge
wilsonge - comment - 11 Nov 2015

@test stats plugin random ID and configuration secret key were generated without any issues. Merging

avatar wilsonge wilsonge - change - 11 Nov 2015
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2015-11-11 01:39:19
Closed_By wilsonge
avatar wilsonge wilsonge - close - 11 Nov 2015
avatar wilsonge wilsonge - reference | 5d8e7d3 - 11 Nov 15
avatar wilsonge wilsonge - merge - 11 Nov 2015
avatar wilsonge wilsonge - close - 11 Nov 2015
avatar mbabker mbabker - head_ref_deleted - 11 Nov 2015
avatar zero-24 zero-24 - change - 11 Nov 2015
Milestone Added:

Add a Comment

Login with GitHub to post a comment