Ticket #46418: 46418.5.diff
File 46418.5.diff, 21.6 KB (added by , 5 years ago) |
---|
-
wp-activate.php
15 15 16 16 if ( ! is_multisite() ) { 17 17 wp_redirect( wp_registration_url() ); 18 die();18 wp_die(); 19 19 } 20 20 21 21 $valid_error_codes = array( 'already_active', 'blog_taken' ); -
wp-admin/admin-footer.php
8 8 9 9 // Don't load directly. 10 10 if ( ! defined( 'ABSPATH' ) ) { 11 die( '-1' );11 wp_die( '-1' ); 12 12 } 13 13 14 14 /** -
wp-admin/async-upload.php
31 31 nocache_headers(); 32 32 33 33 wp_ajax_upload_attachment(); 34 die( '0' );34 wp_die( '0' ); 35 35 } 36 36 37 37 if ( ! current_user_can( 'upload_files' ) ) { -
wp-admin/comment.php
92 92 $comment = get_comment( $comment_id ); 93 93 if ( ! $comment ) { 94 94 wp_redirect( admin_url( 'edit-comments.php?error=1' ) ); 95 die();95 wp_die(); 96 96 } 97 97 98 98 if ( ! current_user_can( 'edit_comment', $comment->comment_ID ) ) { 99 99 wp_redirect( admin_url( 'edit-comments.php?error=2' ) ); 100 die();100 wp_die(); 101 101 } 102 102 103 103 // No need to re-approve/re-trash/re-spam a comment. 104 104 if ( str_replace( '1', 'approve', $comment->comment_approved ) == $action ) { 105 105 wp_redirect( admin_url( 'edit-comments.php?same=' . $comment_id ) ); 106 die();106 wp_die(); 107 107 } 108 108 109 109 require_once ABSPATH . 'wp-admin/admin-header.php'; -
wp-admin/edit-form-advanced.php
8 8 9 9 // Don't load directly. 10 10 if ( ! defined( 'ABSPATH' ) ) { 11 die( '-1' );11 wp_die( '-1' ); 12 12 } 13 13 14 14 /** -
wp-admin/edit-form-blocks.php
10 10 11 11 // Don't load directly. 12 12 if ( ! defined( 'ABSPATH' ) ) { 13 die( '-1' );13 wp_die( '-1' ); 14 14 } 15 15 16 16 /** -
wp-admin/edit-form-comment.php
8 8 9 9 // Don't load directly. 10 10 if ( ! defined( 'ABSPATH' ) ) { 11 die( '-1' );11 wp_die( '-1' ); 12 12 } 13 13 ?> 14 14 <form name="post" action="comment.php" method="post" id="post"> -
wp-admin/edit-link-form.php
8 8 9 9 // Don't load directly. 10 10 if ( ! defined( 'ABSPATH' ) ) { 11 die( '-1' );11 wp_die( '-1' ); 12 12 } 13 13 14 14 if ( ! empty( $link_id ) ) { -
wp-admin/edit-tag-form.php
8 8 9 9 // Don't load directly. 10 10 if ( ! defined( 'ABSPATH' ) ) { 11 die( '-1' );11 wp_die( '-1' ); 12 12 } 13 13 14 14 // Back compat hooks. -
wp-admin/export.php
119 119 $args = apply_filters( 'export_args', $args ); 120 120 121 121 export_wp( $args ); 122 die();122 wp_die(); 123 123 } 124 124 125 125 require_once ABSPATH . 'wp-admin/admin-header.php'; -
wp-admin/includes/class-pclzip.php
218 218 // ----- Tests the zlib 219 219 if (!function_exists('gzopen')) 220 220 { 221 die('Abort '.basename(__FILE__).' : Missing zlib extensions');221 wp_die('Abort '.basename(__FILE__).' : Missing zlib extensions'); 222 222 } 223 223 224 224 // ----- Set the attributes -
wp-admin/includes/class-wp-site-health.php
223 223 224 224 echo ( has_filter( 'wp_version_check', 'wp_version_check' ) ? 'yes' : 'no' ); 225 225 226 die();226 wp_die(); 227 227 } 228 228 229 229 /** -
wp-admin/includes/image-edit.php
25 25 if ( isset( $meta['width'], $meta['height'] ) ) { 26 26 $big = max( $meta['width'], $meta['height'] ); 27 27 } else { 28 die( __( 'Image data does not exist. Please re-upload the image.' ) );28 wp_die( __( 'Image data does not exist. Please re-upload the image.' ) ); 29 29 } 30 30 31 31 $sizer = $big > 400 ? 400 / $big : 1; -
wp-admin/includes/network.php
117 117 ) . '</p></div>'; 118 118 echo '</div>'; 119 119 require_once ABSPATH . 'wp-admin/admin-footer.php'; 120 die();120 wp_die(); 121 121 } 122 122 123 123 $active_plugins = get_option( 'active_plugins' ); … … 130 130 echo '<p>' . __( 'Once the network is created, you may reactivate your plugins.' ) . '</p>'; 131 131 echo '</div>'; 132 132 require_once ABSPATH . 'wp-admin/admin-footer.php'; 133 die();133 wp_die(); 134 134 } 135 135 136 136 $hostname = get_clean_basedomain(); … … 145 145 echo '<a href="' . esc_url( admin_url() ) . '">' . __( 'Return to Dashboard' ) . '</a>'; 146 146 echo '</div>'; 147 147 require_once ABSPATH . 'wp-admin/admin-footer.php'; 148 die();148 wp_die(); 149 149 } 150 150 151 151 echo '<form method="post">'; -
wp-admin/install.php
214 214 // Let's check to make sure WP isn't already installed. 215 215 if ( is_blog_installed() ) { 216 216 display_header(); 217 die(217 wp_die( 218 218 '<h1>' . __( 'Already Installed' ) . '</h1>' . 219 219 '<p>' . __( 'You appear to have already installed WordPress. To reinstall please clear your old database tables first.' ) . '</p>' . 220 220 '<p class="step"><a href="' . esc_url( wp_login_url() ) . '" class="button button-large">' . __( 'Log In' ) . '</a></p>' . … … 261 261 262 262 if ( ! $mysql_compat || ! $php_compat ) { 263 263 display_header(); 264 die( '<h1>' . __( 'Requirements Not Met' ) . '</h1><p>' . $compat . '</p></body></html>' );264 wp_die( '<h1>' . __( 'Requirements Not Met' ) . '</h1><p>' . $compat . '</p></body></html>' ); 265 265 } 266 266 267 267 if ( ! is_string( $wpdb->base_prefix ) || '' === $wpdb->base_prefix ) { 268 268 display_header(); 269 die(269 wp_die( 270 270 '<h1>' . __( 'Configuration Error' ) . '</h1>' . 271 271 '<p>' . sprintf( 272 272 /* translators: %s: wp-config.php */ … … 279 279 // Set error message if DO_NOT_UPGRADE_GLOBAL_TABLES isn't set as it will break install. 280 280 if ( defined( 'DO_NOT_UPGRADE_GLOBAL_TABLES' ) ) { 281 281 display_header(); 282 die(282 wp_die( 283 283 '<h1>' . __( 'Configuration Error' ) . '</h1>' . 284 284 '<p>' . sprintf( 285 285 /* translators: %s: DO_NOT_UPGRADE_GLOBAL_TABLES */ -
wp-admin/link-parse-opml.php
7 7 */ 8 8 9 9 if ( ! defined( 'ABSPATH' ) ) { 10 die();10 wp_die(); 11 11 } 12 12 13 13 /** -
wp-admin/upgrade.php
32 32 // Do it. No output. 33 33 if ( 'upgrade_db' === $step ) { 34 34 wp_upgrade(); 35 die( '0' );35 wp_die( '0' ); 36 36 } 37 37 38 38 /** -
wp-admin/user-edit.php
106 106 wp_update_user( $user ); 107 107 delete_user_meta( $current_user->ID, '_new_email' ); 108 108 wp_redirect( add_query_arg( array( 'updated' => 'true' ), self_admin_url( 'profile.php' ) ) ); 109 die();109 wp_die(); 110 110 } else { 111 111 wp_redirect( add_query_arg( array( 'error' => 'new-email' ), self_admin_url( 'profile.php' ) ) ); 112 112 } … … 114 114 check_admin_referer( 'dismiss-' . $current_user->ID . '_new_email' ); 115 115 delete_user_meta( $current_user->ID, '_new_email' ); 116 116 wp_redirect( add_query_arg( array( 'updated' => 'true' ), self_admin_url( 'profile.php' ) ) ); 117 die();117 wp_die(); 118 118 } 119 119 120 120 switch ( $action ) { -
wp-admin/user-new.php
41 41 $user_details = get_user_by( 'login', $user_email ); 42 42 } else { 43 43 wp_redirect( add_query_arg( array( 'update' => 'enter_email' ), 'user-new.php' ) ); 44 die();44 wp_die(); 45 45 } 46 46 } 47 47 48 48 if ( ! $user_details ) { 49 49 wp_redirect( add_query_arg( array( 'update' => 'does_not_exist' ), 'user-new.php' ) ); 50 die();50 wp_die(); 51 51 } 52 52 53 53 if ( ! current_user_can( 'promote_user', $user_details->ID ) ) { … … 147 147 } 148 148 } 149 149 wp_redirect( $redirect ); 150 die();150 wp_die(); 151 151 } elseif ( isset( $_REQUEST['action'] ) && 'createuser' == $_REQUEST['action'] ) { 152 152 check_admin_referer( 'create-user', '_wpnonce_create-user' ); 153 153 … … 171 171 $redirect = add_query_arg( 'update', 'add', 'user-new.php' ); 172 172 } 173 173 wp_redirect( $redirect ); 174 die();174 wp_die(); 175 175 } 176 176 } else { 177 177 // Adding a new user to this site. … … 214 214 $redirect = add_query_arg( array( 'update' => 'newuserconfirmation' ), 'user-new.php' ); 215 215 } 216 216 wp_redirect( $redirect ); 217 die();217 wp_die(); 218 218 } 219 219 } 220 220 } -
wp-cron.php
29 29 } 30 30 31 31 if ( ! empty( $_POST ) || defined( 'DOING_AJAX' ) || defined( 'DOING_CRON' ) ) { 32 die();32 wp_die(); 33 33 } 34 34 35 35 /** … … 78 78 79 79 $crons = wp_get_ready_cron_jobs(); 80 80 if ( empty( $crons ) ) { 81 die();81 wp_die(); 82 82 } 83 83 84 84 $gmt_time = microtime( true ); … … 149 149 delete_transient( 'doing_cron' ); 150 150 } 151 151 152 die();152 wp_die(); -
wp-includes/IXR/class-IXR-server.php
44 44 header( 'Allow: POST' ); 45 45 } 46 46 header('Content-Type: text/plain'); // merged from WP #9093 47 die('XML-RPC server accepts POST requests only.');47 wp_die('XML-RPC server accepts POST requests only.'); 48 48 } 49 49 50 50 global $HTTP_RAW_POST_DATA; -
wp-includes/canonical.php
354 354 if ( isset( $old_feed_files[ basename( $redirect['path'] ) ] ) ) { 355 355 $redirect_url = get_feed_link( $old_feed_files[ basename( $redirect['path'] ) ] ); 356 356 wp_redirect( $redirect_url, 301 ); 357 die();357 wp_die(); 358 358 } 359 359 } 360 360 … … 399 399 } 400 400 401 401 wp_redirect( $redirect_url, 301 ); 402 die();402 wp_die(); 403 403 } 404 404 } 405 405 … … 616 616 exit(); 617 617 } else { 618 618 // Debug. 619 // die("1: $redirect_url<br />2: " . redirect_canonical( $redirect_url, false ) );619 // wp_die("1: $redirect_url<br />2: " . redirect_canonical( $redirect_url, false ) ); 620 620 return; 621 621 } 622 622 } else { -
wp-includes/class-simplepie.php
662 662 if (version_compare(PHP_VERSION, '5.2', '<')) 663 663 { 664 664 trigger_error('PHP 4.x, 5.0 and 5.1 are no longer supported. Please upgrade to PHP 5.2 or newer.'); 665 die();665 wp_die(); 666 666 } 667 667 668 668 // Other objects, instances created here so we can set options on them -
wp-includes/class-wp-ajax-response.php
157 157 if ( wp_doing_ajax() ) { 158 158 wp_die(); 159 159 } else { 160 die();160 wp_die(); 161 161 } 162 162 } 163 163 } -
wp-includes/class-wp-widget.php
110 110 * @param array $instance The settings for the particular instance of the widget. 111 111 */ 112 112 public function widget( $args, $instance ) { 113 die( 'function WP_Widget::widget() must be overridden in a subclass.' );113 wp_die( 'function WP_Widget::widget() must be overridden in a subclass.' ); 114 114 } 115 115 116 116 /** -
wp-includes/comment.php
713 713 return new WP_Error( 'comment_duplicate', $comment_duplicate_message, 409 ); 714 714 } else { 715 715 if ( wp_doing_ajax() ) { 716 die( $comment_duplicate_message );716 wp_die( $comment_duplicate_message ); 717 717 } 718 718 719 719 wp_die( $comment_duplicate_message, 409 ); … … 732 732 * @param string $comment_author_email Comment author's email. 733 733 * @param string $comment_date_gmt GMT date the comment was posted. 734 734 * @param bool $avoid_die Whether to prevent executing wp_die() 735 * or die() if a comment flood is occurring.735 * or wp_die() if a comment flood is occurring. 736 736 */ 737 737 do_action( 738 738 'check_comment_flood', … … 754 754 * @param string $comment_author_email Comment author's email. 755 755 * @param string $comment_date_gmt GMT date the comment was posted. 756 756 * @param bool $avoid_die Whether to prevent executing wp_die() 757 * or die() if a comment flood is occurring.757 * or wp_die() if a comment flood is occurring. 758 758 */ 759 759 $is_flood = apply_filters( 760 760 'wp_is_comment_flood', … … 927 927 $comment_flood_message = apply_filters( 'comment_flood_message', __( 'You are posting comments too quickly. Slow down.' ) ); 928 928 929 929 if ( wp_doing_ajax() ) { 930 die( $comment_flood_message );930 wp_die( $comment_flood_message ); 931 931 } 932 932 933 933 wp_die( $comment_flood_message, 429 ); -
wp-includes/embed.php
735 735 736 736 if ( ! class_exists( 'SimpleXMLElement' ) ) { 737 737 status_header( 501 ); 738 die( get_status_header_desc( 501 ) );738 wp_die( get_status_header_desc( 501 ) ); 739 739 } 740 740 741 741 $result = _oembed_create_xml( $data ); -
wp-includes/load.php
32 32 } 33 33 34 34 if ( isset( $_REQUEST['GLOBALS'] ) ) { 35 die( 'GLOBALS overwrite attempt detected' );35 wp_die( 'GLOBALS overwrite attempt detected' ); 36 36 } 37 37 38 38 // Variables that shouldn't be unset. … … 217 217 218 218 if ( file_exists( WP_CONTENT_DIR . '/maintenance.php' ) ) { 219 219 require_once WP_CONTENT_DIR . '/maintenance.php'; 220 die();220 wp_die(); 221 221 } 222 222 223 223 require_once ABSPATH . WPINC . '/functions.php'; … … 612 612 $link = wp_guess_url() . '/wp-admin/install.php'; 613 613 614 614 wp_redirect( $link ); 615 die();615 wp_die(); 616 616 } 617 617 } 618 618 … … 1459 1459 ) 1460 1460 ); 1461 1461 echo "###### wp_scraping_result_end:$key ######"; 1462 die();1462 wp_die(); 1463 1463 } 1464 1464 if ( ! defined( 'WP_SANDBOX_SCRAPING' ) ) { 1465 1465 define( 'WP_SANDBOX_SCRAPING', true ); -
wp-includes/ms-deprecated.php
113 113 <p class="message">%s</p> 114 114 </body> 115 115 </html>' ); 116 die( sprintf( $message_template, $message ) );116 wp_die( sprintf( $message_template, $message ) ); 117 117 } 118 118 endif; 119 119 … … 614 614 615 615 $suppress = $wpdb->suppress_errors(); 616 616 if ( $wpdb->get_results( "DESCRIBE {$wpdb->posts}" ) ) { 617 die( '<h1>' . __( 'Already Installed' ) . '</h1><p>' . __( 'You appear to have already installed WordPress. To reinstall please clear your old database tables first.' ) . '</p></body></html>' );617 wp_die( '<h1>' . __( 'Already Installed' ) . '</h1><p>' . __( 'You appear to have already installed WordPress. To reinstall please clear your old database tables first.' ) . '</p></body></html>' ); 618 618 } 619 619 $wpdb->suppress_errors( $suppress ); 620 620 -
wp-includes/ms-files.php
12 12 require_once dirname( __DIR__ ) . '/wp-load.php'; 13 13 14 14 if ( ! is_multisite() ) { 15 die( 'Multisite support not enabled' );15 wp_die( 'Multisite support not enabled' ); 16 16 } 17 17 18 18 ms_file_constants(); … … 21 21 22 22 if ( '1' == $current_blog->archived || '1' == $current_blog->spam || '1' == $current_blog->deleted ) { 23 23 status_header( 404 ); 24 die( '404 — File not found.' );24 wp_die( '404 — File not found.' ); 25 25 } 26 26 27 27 $file = rtrim( BLOGUPLOADDIR, '/' ) . '/' . str_replace( '..', '', $_GET['file'] ); 28 28 if ( ! is_file( $file ) ) { 29 29 status_header( 404 ); 30 die( '404 — File not found.' );30 wp_die( '404 — File not found.' ); 31 31 } 32 32 33 33 $mime = wp_check_filetype( $file ); -
wp-includes/pluggable.php
1137 1137 1138 1138 if ( ! $result && ! ( -1 === $action && strpos( $referer, $adminurl ) === 0 ) ) { 1139 1139 wp_nonce_ays( $action ); 1140 die();1140 wp_die(); 1141 1141 } 1142 1142 1143 1143 return $result; … … 1192 1192 if ( wp_doing_ajax() ) { 1193 1193 wp_die( -1, 403 ); 1194 1194 } else { 1195 die( '-1' );1195 wp_die( '-1' ); 1196 1196 } 1197 1197 } 1198 1198 -
wp-includes/rest-api.php
306 306 $server->serve_request( $route ); 307 307 308 308 // We're done. 309 die();309 wp_die(); 310 310 } 311 311 312 312 /** -
wp-includes/theme-compat/comments.php
17 17 18 18 // Do not delete these lines. 19 19 if ( ! empty( $_SERVER['SCRIPT_FILENAME'] ) && 'comments.php' == basename( $_SERVER['SCRIPT_FILENAME'] ) ) { 20 die( 'Please do not load this page directly. Thanks!' );20 wp_die( 'Please do not load this page directly. Thanks!' ); 21 21 } 22 22 23 23 if ( post_password_required() ) { ?> -
wp-includes/wp-db.php
1668 1668 // Load custom DB error template, if present. 1669 1669 if ( file_exists( WP_CONTENT_DIR . '/db-error.php' ) ) { 1670 1670 require_once WP_CONTENT_DIR . '/db-error.php'; 1671 die();1671 wp_die(); 1672 1672 } 1673 1673 1674 1674 $message = '<h1>' . __( 'Error establishing a database connection' ) . "</h1>\n"; -
wp-settings.php
544 544 $file = ms_site_check(); 545 545 if ( true !== $file ) { 546 546 require $file; 547 die();547 wp_die(); 548 548 } 549 549 unset( $file ); 550 550 } -
wp-signup.php
11 11 12 12 if ( is_array( get_site_option( 'illegal_names' ) ) && isset( $_GET['new'] ) && in_array( $_GET['new'], get_site_option( 'illegal_names' ), true ) ) { 13 13 wp_redirect( network_home_url() ); 14 die();14 wp_die(); 15 15 } 16 16 17 17 /** … … 31 31 32 32 if ( ! is_multisite() ) { 33 33 wp_redirect( wp_registration_url() ); 34 die();34 wp_die(); 35 35 } 36 36 37 37 if ( ! is_main_site() ) { 38 38 wp_redirect( network_site_url( 'wp-signup.php' ) ); 39 die();39 wp_die(); 40 40 } 41 41 42 42 // Fix for page title. … … 409 409 global $blogname, $blog_title, $errors, $domain, $path; 410 410 $current_user = wp_get_current_user(); 411 411 if ( ! is_user_logged_in() ) { 412 die();412 wp_die(); 413 413 } 414 414 415 415 $result = validate_blog_form(); -
wp-trackback.php
32 32 echo "<error>1</error>\n"; 33 33 echo "<message>$error_message</message>\n"; 34 34 echo '</response>'; 35 die();35 wp_die(); 36 36 } else { 37 37 echo '<?xml version="1.0" encoding="utf-8"?' . ">\n"; 38 38 echo "<response>\n"; … … 65 65 66 66 // No valid uses for UTF-7. 67 67 if ( false !== strpos( $charset, 'UTF-7' ) ) { 68 die;68 wp_die; 69 69 } 70 70 71 71 // For international trackbacks.