Skip to content

Releases: paragonie/random_compat

Version 1.0.9

20 Oct 15:35
Compare
Choose a tag to compare

There is an outstanding issue mcrypt_create_iv() and PHP 7's random_bytes() on Windows reported by @nicolas-grekas caused by proc_open() and environment variable handling (discovered by Appveyor when developing Symfony).

Since the break is consistent, it's not our responsibility to fix it, but we should fail the same way PHP 7 will (i.e. throw an Exception rather than raise an error and then throw an Exception).

Version 1.0.8

18 Oct 21:41
Compare
Choose a tag to compare
  • Fix usability issues with Windows (new COM('CAPICOM.Utilities.1') is not always available).
  • You can now test all the possible drivers by running phpunit.sh each in the tests directory.

Version 1.0.7

17 Oct 03:45
Compare
Choose a tag to compare

Several large integer handling bugfixes were contributed by @oittaa.

Version 1.0.6

16 Oct 03:52
Compare
Choose a tag to compare

Don't let the version number fool you, this was a pretty significant change.

  1. Added support for ext-libsodium, if it exists on the system. This is morally equivalent to adding getrandom(2) support without having to expose the syscall interface in PHP-land.
  2. Relaxed open_basedir restrictions. In previous versions, if open_basedir was set, PHP wouldn't even try to read from /dev/urandom. Now it will still do so if you can.
  3. Fixed integer casting inconsistencies between random_compat and PHP 7.
  4. Handle edge cases where an integer overflow turns one of the parameters into a float.

One change that we discussed was making random_bytes() and random_int() strict typed; meaning you could only pass integers to either function. While most veteran programmers are probably only doing this already (we strongly encourage it), it wouldn't be consistent with how these functions behave in PHP 7. Please use these functions responsibly.

We've had even more of the PHP community involved in this release; the contributors list has been updated. If I forgot anybody, I promise you it's not because your contributions (either code or ideas) aren't valued, it's because I'm a bit overloaded with information at the moment. Please let me know immediately and I will correct my oversight.

Thanks everyone for helping make random_compat better.

Version 1.0.5

08 Oct 20:31
Compare
Choose a tag to compare

Got rid of the methods in the Throwable interface, which was causing problems on PHP 5.2. While we would normally not care about 5.2 (since 5.4 and earlier are EOL'd), we do want to encourage widespread adoption (e.g. Wordpress).

Version 1.0.4

05 Oct 22:36
Compare
Choose a tag to compare

Removed redundant if() checks, since lib/random.php is the entrypoint people should use.

Version 1.0.3

02 Oct 14:18
Compare
Choose a tag to compare

This release contains bug fixes contributed by the community.

  • Avoid a PHP Notice when PHP is running without the mbstring extension
  • Use a compatible version of PHPUnit for testing on older versions of PHP

Although none of these bugs were outright security-affecting, updating ASAP is still strongly encouraged.

Version 1.0.2

23 Sep 04:11
Compare
Choose a tag to compare

Less strict input validation on random_int() parameters. PHP 7's random_int() accepts strings and floats that look like numbers, so we should too.

Thanks @dd32 for correcting this oversight.

Version 1.0.1

19 Sep 00:37
Compare
Choose a tag to compare

I'll stop prefixing version tags with the letter v to fix composer.

Version 1.0.1- Exceptions Only

10 Sep 18:46
Compare
Choose a tag to compare

Changed the usability a bit. See v1.0.1.

You want v1.0.1 (below) unless you have compatibility issues.