#35327 closed defect (bug) (fixed)
Using libsodium for random bytes breaks plugin update in WP 4.4
Reported by: | krakendancer | Owned by: | dd32 |
---|---|---|---|
Milestone: | 4.4.2 | Priority: | normal |
Severity: | normal | Version: | 4.4 |
Component: | External Libraries | Keywords: | fixed-major |
Focuses: | Cc: |
Description
Running WP 4.4 on
CentOS 7.2.1511
nginx 1.9.9
PHP 5.4.16
libsodium 1.0.5
php-pecl-libsodium 1.0.2
After updating to WP 4.4 plug-ins cannot be updated anymore.
Updates fail with
[06-Jan-2016 12:21:21 UTC] PHP Fatal error: Call to undefined function Sodium\randombytes_buf() in /var/www/verifyne.me/wp/wp-includes/random_compat/random_bytes_libsodium.php on line 69
The lines 66 and 69 state
\Sodium\randombytes_buf
whereas the following works for me
\Sodium::randombytes_buf
Attachments (1)
Change History (11)
#2
@
9 years ago
\Sodium::
That syntax was dropped long before 1.0.0 was tagged. Please upgrade your extension to a stable version.
See also https://github.com/jedisct1/libsodium-php/issues/58 for a reason why you want to run, at minimum, version 1.0.1
#3
@
9 years ago
PHP 5.4.16
libsodium 1.0.5
php-pecl-libsodium 1.0.2
What is the ouput of the following script?
var_dump( Sodium::library_version_major(), Sodium::library_version_minor() );
#4
@
9 years ago
Supposing you mean
var_dump( Sodium::sodium_library_version_major(), Sodium::sodium_library_version_minor() );
gives
int(7) int(6)
#5
@
9 years ago
- Milestone changed from Awaiting Review to 4.4.2
We'll update to master in trunk to bring in the fix.
However for the 4.4 branch we'll need to instead use 35327.44-branch.diff as we can't add new files in a point release.
#6
@
9 years ago
We tagged and released 1.1.5
just now, which should work for your setup.
#7
@
9 years ago
- Owner set to dd32
- Resolution set to fixed
- Status changed from new to closed
In 36220:
Hey @krakendancer Thanks for the report.
I've filed a bug upstream here: https://github.com/paragonie/random_compat/issues/85
According to the documentation, it's being called correctly, but perhaps not..