[wp-trac] [WordPress Trac] #58856: There is str_contains() in wp-login.php.

WordPress Trac noreply at wordpress.org
Thu Jul 20 03:02:08 UTC 2023


#58856: There is str_contains() in wp-login.php.
--------------------------+-----------------------------
 Reporter:  nendeb55      |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  trunk
 Severity:  critical      |   Keywords:  needs-patch
  Focuses:                |
--------------------------+-----------------------------
 You should revert to strpos() since str_contains() is from php8.0.

 WordPress6.3 RC1

 wp-login.php

 {{{
                         } elseif ( str_contains( $redirect_to,
 'about.php?updated' ) ) {
                                 $errors->add( 'updated', __( '<strong>You
 have successfully updated WordPress!</strong> Please log back in to see
 what’s new.' ), 'message' );
                         } elseif (
 WP_Recovery_Mode_Link_Service::LOGIN_ACTION_ENTERED === $action ) {
                                 $errors->add( 'enter_recovery_mode', __(
 'Recovery Mode Initialized. Please log in to continue.' ), 'message' );
                         } elseif ( isset( $_GET['redirect_to'] ) &&
 str_contains( $_GET['redirect_to'], 'wp-admin/authorize-application.php' )
 ) {

 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/58856>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list