Ticket #57809: localhost-secure-context-app-passwords.patch
File localhost-secure-context-app-passwords.patch, 1.1 KB (added by , 2 years ago) |
---|
-
wordpress/wp-admin/includes/user.php
old new 623 623 624 624 if ( ! empty( $request['success_url'] ) ) { 625 625 $scheme = wp_parse_url( $request['success_url'], PHP_URL_SCHEME ); 626 $host = wp_parse_url( $request['success_url'], PHP_URL_HOST ); 627 $host_is_localhost = preg_match('/^localhost(:[0-9]+)?$/i', $host); 626 628 627 if ( 'http' === $scheme ) {629 if ( 'http' === $scheme && !$host_is_localhost ) { 628 630 $error->add( 629 631 'invalid_redirect_scheme', 630 632 __( 'The success URL must be served over a secure connection.' ) … … 634 636 635 637 if ( ! empty( $request['reject_url'] ) ) { 636 638 $scheme = wp_parse_url( $request['reject_url'], PHP_URL_SCHEME ); 639 $host = wp_parse_url( $request['reject_url'], PHP_URL_HOST ); 640 $host_is_localhost = preg_match('/^localhost(:[0-9]+)?$/i', $host); 637 641 638 if ( 'http' === $scheme ) {642 if ( 'http' === $scheme && !$host_is_localhost ) { 639 643 $error->add( 640 644 'invalid_redirect_scheme', 641 645 __( 'The rejection URL must be served over a secure connection.' )