Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#51399 closed defect (bug) (fixed)

Update sodium_compat to v1.13.x

Reported by: sergeybiryukov's profile SergeyBiryukov Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 5.6 Priority: normal
Severity: normal Version:
Component: External Libraries Keywords: php8
Focuses: Cc:

Description

Previously: #48371

sodium_compat was updated to v1.12.1 in [46858] for WordPress 5.3.1.

Two new releases have been made since then:
https://github.com/paragonie/sodium_compat/releases/tag/v1.12.2
https://github.com/paragonie/sodium_compat/releases/tag/v1.13.0

List of changes from v1.12.1 to v1.13.0:
https://github.com/paragonie/sodium_compat/compare/v1.12.1...v1.13.0

For WordPress 5.6, one more particular fix is relevant for PHP 8 compatibility:
https://github.com/paragonie/sodium_compat/pull/119

In PHP 8, the MB_OVERLOAD_STRING constant has been removed along with the mbstring function overload feature. This is now causing a test failure:

1) Tests_File::test_file_signature_functions_as_expected
Error: Undefined constant "MB_OVERLOAD_STRING"

/var/www/build/wp-includes/sodium_compat/src/Core/Util.php:915
/var/www/build/wp-includes/sodium_compat/src/Core/Util.php:757
/var/www/build/wp-includes/sodium_compat/src/Compat.php:2858
/var/www/build/wp-includes/sodium_compat/lib/php72compat.php:1137
/var/www/build/wp-admin/includes/file.php:1348
/var/www/tests/phpunit/tests/file.php:198

The PR above is merged and fixes the issue. However, a new release is not tagged yet, so we'll have to backport that commit separately for now, and keep an eye on the next release.

Change History (3)

#1 @SergeyBiryukov
4 years ago

  • Owner set to SergeyBiryukov
  • Status changed from new to accepted

#2 @SergeyBiryukov
4 years ago

In 49056:

Upgrade/Install: Update sodium_compat to v1.13.0.

This includes a few autoloader fixes and improvements.

A full list of changes in this update can be found on GitHub:
https://github.com/paragonie/sodium_compat/compare/v1.12.1...v1.13.0

See #51399.

#3 @SergeyBiryukov
4 years ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 49057:

External Libraries: Backport a commit from sodium_compat trunk to fix a PHP 8 error.

This addresses an "Undefined constant MB_OVERLOAD_STRING" fatal error in the ParagonIE_Sodium_Core_Util::isMbStringOverride() method.

In PHP 8, the MB_OVERLOAD_STRING constant has been removed, along with the mbstring function overloading feature.

Fixes #51399.

Note: See TracTickets for help on using tickets.