Changeset 63104
- Timestamp:
- 08/06/2026 07:46:36 PM (5 weeks ago)
- Location:
- branches/5.8/src
- Files:
-
- 8 edited
-
js/_enqueues/admin/inline-edit-post.js (modified) (1 diff)
-
wp-admin/includes/user.php (modified) (3 diffs)
-
wp-includes/canonical.php (modified) (2 diffs)
-
wp-includes/http.php (modified) (1 diff)
-
wp-includes/kses.php (modified) (1 diff)
-
wp-includes/user.php (modified) (8 diffs)
-
wp-login.php (modified) (2 diffs)
-
wp-signup.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/5.8/src/js/_enqueues/admin/inline-edit-post.js
r50547 r63104 278 278 279 279 // The post author no longer has edit capabilities, so we need to add them to the list of authors. 280 $(':input[name="post_author"]', editRow).prepend('<option value="' + $('.post_author', rowData).text() + '">' + $('#' + t.type + '-' + id + ' .author').text() + '</option>'); 280 $(':input[name="post_author"]', editRow).prepend( 281 new Option( 282 $('#' + t.type + '-' + id + ' .author').text(), 283 $('.post_author', rowData).text() 284 ) 285 ); 281 286 } 282 287 if ( $( ':input[name="post_author"] option', editRow ).length === 1 ) { -
branches/5.8/src/wp-admin/includes/user.php
r56884 r63104 45 45 } 46 46 47 $errors = new WP_Error(); 48 47 49 $pass1 = ''; 48 50 $pass2 = ''; … … 79 81 80 82 if ( isset( $_POST['email'] ) ) { 81 $user->user_email = sanitize_text_field( wp_unslash( $_POST['email'] ) ); 83 $maybe_email = wp_unslash( $_POST['email'] ); 84 if ( is_string( $maybe_email ) && is_email( $maybe_email ) ) { 85 $user->user_email = $maybe_email; 86 } else { 87 $errors->add( 'invalid_email', __( '<strong>Error</strong>: The email address isn’t correct.' ), array( 'form-field' => 'email' ) ); 88 } 82 89 } 83 90 if ( isset( $_POST['url'] ) ) { … … 139 146 $user->use_ssl = 1; 140 147 } 141 142 $errors = new WP_Error();143 148 144 149 /* checking that username has been typed */ -
branches/5.8/src/wp-includes/canonical.php
r51125 r63104 913 913 914 914 if ( get_query_var( 'name' ) ) { 915 $publicly_viewable_post_types = array_filter( get_post_types( array( 'exclude_from_search' => false ) ), 'is_post_type_viewable' ); 916 915 917 /** 916 918 * Filters whether to perform a strict guess for a 404 redirect. … … 933 935 if ( get_query_var( 'post_type' ) ) { 934 936 if ( is_array( get_query_var( 'post_type' ) ) ) { 935 // phpcs:ignore WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare 936 $where .= " AND post_type IN ('" . join( "', '", esc_sql( get_query_var( 'post_type' ) ) ) . "')"; 937 $post_types = array_intersect( get_query_var( 'post_type' ), $publicly_viewable_post_types ); 938 if ( empty( $post_types ) ) { 939 return false; 940 } 941 $where .= " AND post_type IN ('" . implode( "', '", esc_sql( $post_types ) ) . "')"; 937 942 } else { 943 if ( ! in_array( get_query_var( 'post_type' ), $publicly_viewable_post_types, true ) ) { 944 return false; 945 } 938 946 $where .= $wpdb->prepare( ' AND post_type = %s', get_query_var( 'post_type' ) ); 939 947 } 940 948 } else { 941 $where .= " AND post_type IN ('" . implode( "', '", get_post_types( array( 'public' => true )) ) . "')";949 $where .= " AND post_type IN ('" . implode( "', '", esc_sql( $publicly_viewable_post_types ) ) . "')"; 942 950 } 943 951 -
branches/5.8/src/wp-includes/http.php
r49108 r63104 554 554 if ( $ip ) { 555 555 $parts = array_map( 'intval', explode( '.', $ip ) ); 556 if ( 127 === $parts[0] || 10 === $parts[0] || 0 === $parts[0] 557 || ( 172 === $parts[0] && 16 <= $parts[1] && 31 >= $parts[1] ) 558 || ( 192 === $parts[0] && 168 === $parts[1] ) 556 557 /* 558 * These IP address ranges are not considered valid external hosts for HTTP requests. 559 * 560 * If the host resolves to an IP address in these ranges, the request will be rejected unless the 'http_request_host_is_external' filter allows it. 561 * 562 * References: 563 * 564 * - IPv4 Special-Purpose Address Space: https://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml 565 * - IPv4 Multicast Address Assignments: https://www.rfc-editor.org/rfc/rfc5771.html 566 */ 567 if ( 127 === $parts[0] || 10 === $parts[0] || 0 === $parts[0] // 127.0.0.0/8 (loopback), 10.0.0.0/8 (private), 0.0.0.0/8 (this network). 568 || ( 172 === $parts[0] && 16 <= $parts[1] && 31 >= $parts[1] ) // 172.16.0.0/12 (private). 569 || ( 192 === $parts[0] && 168 === $parts[1] ) // 192.168.0.0/16 (private). 570 || ( 192 === $parts[0] && 0 === $parts[1] && 0 === $parts[2] ) // 192.0.0.0/24 (IETF protocol assignments). 571 || ( 192 === $parts[0] && 0 === $parts[1] && 2 === $parts[2] ) // 192.0.2.0/24 (TEST-NET-1). 572 || ( 192 === $parts[0] && 88 === $parts[1] && 99 === $parts[2] ) // 192.88.99.0/24 (6to4 relay anycast). 573 || ( 198 === $parts[0] && 51 === $parts[1] && 100 === $parts[2] ) // 198.51.100.0/24 (TEST-NET-2). 574 || ( 203 === $parts[0] && 0 === $parts[1] && 113 === $parts[2] ) // 203.0.113.0/24 (TEST-NET-3). 575 || ( 169 === $parts[0] && 254 === $parts[1] ) // 169.254.0.0/16 (link-local and cloud metadata). 576 || ( 100 === $parts[0] && 64 <= $parts[1] && 127 >= $parts[1] ) // 100.64.0.0/10 (CGNAT). 577 || ( 198 === $parts[0] && 18 <= $parts[1] && 19 >= $parts[1] ) // 198.18.0.0/15 (benchmarking). 578 || ( 224 <= $parts[0] && 239 >= $parts[0] ) // 224.0.0.0/4 (multicast). 579 || 240 <= $parts[0] // 240.0.0.0/4 (reserved, includes 255.255.255.255 broadcast). 559 580 ) { 560 581 // If host appears local, reject unless specifically allowed. -
branches/5.8/src/wp-includes/kses.php
r61952 r63104 2391 2391 // Allow CSS calc(). 2392 2392 $css_test_string = preg_replace( '/calc\(((?:\([^()]*\)?|[^()])*)\)/', '', $css_test_string ); 2393 if ( null === $css_test_string ) { 2394 continue; 2395 } 2396 2393 2397 // Allow CSS var(). 2394 2398 $css_test_string = preg_replace( '/\(?var\(--[a-zA-Z0-9_-]*\)/', '', $css_test_string ); 2399 if ( null === $css_test_string ) { 2400 continue; 2401 } 2395 2402 2396 2403 // Check for any CSS containing \ ( & } = or comments, 2397 2404 // except for url(), calc(), or var() usage checked above. 2398 $allow_css = !preg_match( '%[\\\(&=}]|/\*%', $css_test_string );2405 $allow_css = 0 === preg_match( '%[\\\(&=}]|/\*%', $css_test_string ); 2399 2406 2400 2407 /** -
branches/5.8/src/wp-includes/user.php
r54548 r63104 153 153 /* translators: %s: User name. */ 154 154 __( '<strong>Error</strong>: The username <strong>%s</strong> is not registered on this site. If you are unsure of your username, try your email address instead.' ), 155 $username155 esc_html( $username ) 156 156 ) 157 157 ); … … 178 178 /* translators: %s: User name. */ 179 179 __( '<strong>Error</strong>: The password you entered for the username %s is incorrect.' ), 180 '<strong>' . $username. '</strong>'180 '<strong>' . esc_html( $username ) . '</strong>' 181 181 ) . 182 182 ' <a href="' . wp_lostpassword_url() . '">' . … … 250 250 /* translators: %s: Email address. */ 251 251 __( '<strong>Error</strong>: The password you entered for the email address %s is incorrect.' ), 252 '<strong>' . $email. '</strong>'252 '<strong>' . esc_html( $email ) . '</strong>' 253 253 ) . 254 254 ' <a href="' . wp_lostpassword_url() . '">' . … … 2979 2979 /* translators: %s: Admin email address. */ 2980 2980 __( '<strong>Error</strong>: Couldn’t register you… please contact the <a href="mailto:%s">site admin</a>!' ), 2981 get_option( 'admin_email')2981 esc_attr( get_option( 'admin_email' ) ) 2982 2982 ) 2983 2983 ); … … 3195 3195 * @since 3.0.0 3196 3196 * @since 4.9.0 This function was moved from wp-admin/includes/ms.php so it's no longer Multisite specific. 3197 * @since 7.0.3 Added the `$user_id` parameter, which is sent with the `personal_options_update` action. 3198 * 3199 * @param int $user_id Optional. The ID of the user whose email is being changed. Defaults to `$_POST['user_id']` if set, otherwise 0. 3197 3200 * 3198 3201 * @global WP_Error $errors WP_Error object. 3199 3202 */ 3200 function send_confirmation_on_profile_email( ) {3203 function send_confirmation_on_profile_email( $user_id = 0 ) { 3201 3204 global $errors; 3205 3206 // Maintain backward compatibility for those relying on a check based on $_POST['user_id']. 3207 if ( ! $user_id && isset( $_POST['user_id'] ) ) { 3208 $user_id = (int) $_POST['user_id']; 3209 } 3202 3210 3203 3211 $current_user = wp_get_current_user(); … … 3206 3214 } 3207 3215 3208 if ( $current_user->ID != $_POST['user_id']) {3216 if ( 0 === $current_user->ID || $current_user->ID !== (int) $user_id ) { 3209 3217 return false; 3210 3218 } … … 3220 3228 ); 3221 3229 3230 $_POST['email'] = addslashes( $current_user->user_email ); 3222 3231 return; 3223 3232 } … … 3233 3242 delete_user_meta( $current_user->ID, '_new_email' ); 3234 3243 3244 $_POST['email'] = addslashes( $current_user->user_email ); 3235 3245 return; 3236 3246 } -
branches/5.8/src/wp-login.php
r50677 r63104 1041 1041 /* translators: %s: Link to the login page. */ 1042 1042 __( 'Check your email for the confirmation link, then visit the <a href="%s">login page</a>.' ), 1043 wp_login_url()1043 esc_url( wp_login_url() ) 1044 1044 ), 1045 1045 'message' … … 1051 1051 /* translators: %s: Link to the login page. */ 1052 1052 __( 'Registration complete. Please check your email, then visit the <a href="%s">login page</a>.' ), 1053 wp_login_url()1053 esc_url( wp_login_url() ) 1054 1054 ), 1055 1055 'message' -
branches/5.8/src/wp-signup.php
r50828 r63104 962 962 break; 963 963 case 'gimmeanotherblog': 964 validate_another_blog_signup(); 964 if ( 'all' === $active_signup || 'blog' === $active_signup ) { 965 validate_another_blog_signup(); 966 } else { 967 _e( 'Site registration has been disabled.' ); 968 } 965 969 break; 966 970 case 'default':
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)