Make WordPress Core

Opened 6 years ago

Closed 6 hours ago

#47855 closed defect (bug) (worksforme)

PHPMailer::validateAddress() fails on PHP 7.3 with libpcre2 < 10.32

Reported by: yolabingo's profile yolabingo Owned by:
Milestone: Awaiting Review Priority: normal
Severity: minor Version: 5.2.2
Component: Mail Keywords:
Focuses: Cc:

Description

Due to a bug in libpcre2 < 10.32-RC1 https://bugs.exim.org/show_bug.cgi?id=2300,
this email regex validation fails in PHP 7.3 with PCRE_VERSION < 10.32.
One consequence of this is being unable to send a password reset link from the login page - the user sees the error
"The email could not be sent. Possible reason: your host may have disabled the mail() function."

A simple test script https://gist.github.com/yolabingo/68b4f037661e702742c5abb324a3d992

PHP < 7.3 uses libpcre 8.x
PHP 7.3 uses libpcre2 10.x

Attachments (1)

wp-email-validate-check.php (2.1 KB) - added by yolabingo 6 years ago.
simple script to test the

Download all attachments as: .zip

Change History (5)

@yolabingo
6 years ago

simple script to test the

#1 @SergeyBiryukov
6 years ago

  • Keywords php73 added

#2 @jrf
6 years ago

Sounds very similar to #33037 ?

#3 @SirLouen
7 hours ago

Reproduction Report

Description

❌ This report validates whether the issue can be reproduced.

Environment

  • WordPress: 6.9-alpha-60093-src
  • PHP: 7.3.33
  • Server: nginx/1.29.0
  • Database: mysqli (Server: 8.4.5 / Client: mysqlnd 5.0.12-dev)
  • Browser: Chrome 138.0.0.0
  • OS: Windows 10/11
  • Theme: Twenty Twenty-Five 1.2
  • MU Plugins: None activated
  • Plugins:
    • Test Reports 1.2.0

Testing Instructions

  1. I followed the one provided by OP, using the test script, results below

Actual Results

  • ❌ Error condition is not occurring any more.

Additional Notes

  • This is a very old report that has not aged well, PCRE versions have been updated and all seem to be resulting as expected. I will be closing this now because it's not affecting any more, as worksforme

Supplemental Artifacts

Script results:

PHP version: 7.2.34
PCRE version: 8.41
Wordpress email validation preg_match succeeded

PHP version: 7.3.33
PCRE version: 10.32
Wordpress email validation preg_match succeeded

PHP version: 7.4.33
PCRE version: 10.35 2020-05-09
Wordpress email validation preg_match succeeded

Last edited 6 hours ago by SirLouen (previous) (diff)

#4 @SirLouen
6 hours ago

  • Keywords php73 removed
  • Resolution set to worksforme
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.