Ticket #46418: 46418.diff
File 46418.diff, 23.1 KB (added by , 5 years ago) |
---|
-
src/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' ); -
src/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 /** -
src/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' ) ) { -
src/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'; -
src/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 /** -
src/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 /** -
src/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"> -
src/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 ) ) { -
src/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. -
src/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'; -
src/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 -
src/wp-admin/includes/class-wp-site-health.php
228 228 229 229 echo ( has_filter( 'wp_version_check', 'wp_version_check' ) ? 'yes' : 'no' ); 230 230 231 die();231 wp_die(); 232 232 } 233 233 234 234 /** -
src/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; -
src/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">'; -
src/wp-admin/install.php
213 213 // Let's check to make sure WP isn't already installed. 214 214 if ( is_blog_installed() ) { 215 215 display_header(); 216 die(216 wp_die( 217 217 '<h1>' . __( 'Already Installed' ) . '</h1>' . 218 218 '<p>' . __( 'You appear to have already installed WordPress. To reinstall please clear your old database tables first.' ) . '</p>' . 219 219 '<p class="step"><a href="' . esc_url( wp_login_url() ) . '" class="button button-large">' . __( 'Log In' ) . '</a></p>' . … … 260 260 261 261 if ( ! $mysql_compat || ! $php_compat ) { 262 262 display_header(); 263 die( '<h1>' . __( 'Requirements Not Met' ) . '</h1><p>' . $compat . '</p></body></html>' );263 wp_die( '<h1>' . __( 'Requirements Not Met' ) . '</h1><p>' . $compat . '</p></body></html>' ); 264 264 } 265 265 266 266 if ( ! is_string( $wpdb->base_prefix ) || '' === $wpdb->base_prefix ) { 267 267 display_header(); 268 die(268 wp_die( 269 269 '<h1>' . __( 'Configuration Error' ) . '</h1>' . 270 270 '<p>' . sprintf( 271 271 /* translators: %s: wp-config.php */ … … 278 278 // Set error message if DO_NOT_UPGRADE_GLOBAL_TABLES isn't set as it will break install. 279 279 if ( defined( 'DO_NOT_UPGRADE_GLOBAL_TABLES' ) ) { 280 280 display_header(); 281 die(281 wp_die( 282 282 '<h1>' . __( 'Configuration Error' ) . '</h1>' . 283 283 '<p>' . sprintf( 284 284 /* translators: %s: DO_NOT_UPGRADE_GLOBAL_TABLES */ -
src/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 /** -
src/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 /** -
src/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 ) { -
src/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 } -
src/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(); -
src/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; -
src/wp-includes/canonical.php
462 462 $redirect_url = get_feed_link( $old_feed_files[ basename( $redirect['path'] ) ] ); 463 463 464 464 wp_redirect( $redirect_url, 301 ); 465 die();465 wp_die(); 466 466 } 467 467 } 468 468 … … 521 521 } 522 522 523 523 wp_redirect( $redirect_url, 301 ); 524 die();524 wp_die(); 525 525 } 526 526 } 527 527 … … 755 755 exit; 756 756 } else { 757 757 // Debug. 758 // die("1: $redirect_url<br />2: " . redirect_canonical( $redirect_url, false ) );758 // wp_die("1: $redirect_url<br />2: " . redirect_canonical( $redirect_url, false ) ); 759 759 return; 760 760 } 761 761 } else { -
src/wp-includes/class-simplepie.php
703 703 if (version_compare(PHP_VERSION, '5.6', '<')) 704 704 { 705 705 trigger_error('Please upgrade to PHP 5.6 or newer.'); 706 die();706 wp_die(); 707 707 } 708 708 709 709 // Other objects, instances created here so we can set options on them -
src/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 } -
src/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 /** -
src/wp-includes/comment.php
723 723 return new WP_Error( 'comment_duplicate', $comment_duplicate_message, 409 ); 724 724 } else { 725 725 if ( wp_doing_ajax() ) { 726 die( $comment_duplicate_message );726 wp_die( $comment_duplicate_message ); 727 727 } 728 728 729 729 wp_die( $comment_duplicate_message, 409 ); … … 742 742 * @param string $comment_author_email Comment author's email. 743 743 * @param string $comment_date_gmt GMT date the comment was posted. 744 744 * @param bool $avoid_die Whether to prevent executing wp_die() 745 * or die() if a comment flood is occurring.745 * or wp_die() if a comment flood is occurring. 746 746 */ 747 747 do_action( 748 748 'check_comment_flood', … … 764 764 * @param string $comment_author_email Comment author's email. 765 765 * @param string $comment_date_gmt GMT date the comment was posted. 766 766 * @param bool $avoid_die Whether to prevent executing wp_die() 767 * or die() if a comment flood is occurring.767 * or wp_die() if a comment flood is occurring. 768 768 */ 769 769 $is_flood = apply_filters( 770 770 'wp_is_comment_flood', … … 937 937 $comment_flood_message = apply_filters( 'comment_flood_message', __( 'You are posting comments too quickly. Slow down.' ) ); 938 938 939 939 if ( wp_doing_ajax() ) { 940 die( $comment_flood_message );940 wp_die( $comment_flood_message ); 941 941 } 942 942 943 943 wp_die( $comment_flood_message, 429 ); -
src/wp-includes/embed.php
734 734 735 735 if ( ! class_exists( 'SimpleXMLElement' ) ) { 736 736 status_header( 501 ); 737 die( get_status_header_desc( 501 ) );737 wp_die( get_status_header_desc( 501 ) ); 738 738 } 739 739 740 740 $result = _oembed_create_xml( $data ); -
src/wp-includes/functions.php
3557 3557 </html> 3558 3558 <?php 3559 3559 if ( $parsed_args['exit'] ) { 3560 die();3560 wp_die(); 3561 3561 } 3562 3562 } 3563 3563 … … 3597 3597 } 3598 3598 3599 3599 if ( $parsed_args['exit'] ) { 3600 die( $message );3600 wp_die( $message ); 3601 3601 } 3602 3602 3603 3603 echo $message; … … 3637 3637 3638 3638 echo wp_json_encode( $data ); 3639 3639 if ( $parsed_args['exit'] ) { 3640 die();3640 wp_die(); 3641 3641 } 3642 3642 } 3643 3643 … … 3679 3679 $jsonp_callback = $_GET['_jsonp']; 3680 3680 echo '/**/' . $jsonp_callback . '(' . $result . ')'; 3681 3681 if ( $parsed_args['exit'] ) { 3682 die();3682 wp_die(); 3683 3683 } 3684 3684 } 3685 3685 … … 3711 3711 $wp_xmlrpc_server->output( $error->getXml() ); 3712 3712 } 3713 3713 if ( $parsed_args['exit'] ) { 3714 die();3714 wp_die(); 3715 3715 } 3716 3716 } 3717 3717 … … 3755 3755 3756 3756 echo $xml; 3757 3757 if ( $parsed_args['exit'] ) { 3758 die();3758 wp_die(); 3759 3759 } 3760 3760 } 3761 3761 … … 3777 3777 3778 3778 if ( $parsed_args['exit'] ) { 3779 3779 if ( is_scalar( $message ) ) { 3780 die( (string) $message );3780 wp_die( (string) $message ); 3781 3781 } 3782 die();3782 wp_die(); 3783 3783 } 3784 3784 3785 3785 if ( is_scalar( $message ) ) { … … 4654 4654 // Load custom DB error template, if present. 4655 4655 if ( file_exists( WP_CONTENT_DIR . '/db-error.php' ) ) { 4656 4656 require_once WP_CONTENT_DIR . '/db-error.php'; 4657 die();4657 wp_die(); 4658 4658 } 4659 4659 4660 4660 // If installing or in the admin, provide the verbose message. -
src/wp-includes/load.php
160 160 161 161 if ( file_exists( WP_CONTENT_DIR . '/maintenance.php' ) ) { 162 162 require_once WP_CONTENT_DIR . '/maintenance.php'; 163 die();163 wp_die(); 164 164 } 165 165 166 166 require_once ABSPATH . WPINC . '/functions.php'; … … 602 602 $link = wp_guess_url() . '/wp-admin/install.php'; 603 603 604 604 wp_redirect( $link ); 605 die();605 wp_die(); 606 606 } 607 607 } 608 608 … … 1449 1449 ) 1450 1450 ); 1451 1451 echo "###### wp_scraping_result_end:$key ######"; 1452 die();1452 wp_die(); 1453 1453 } 1454 1454 if ( ! defined( 'WP_SANDBOX_SCRAPING' ) ) { 1455 1455 define( 'WP_SANDBOX_SCRAPING', true ); -
src/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 -
src/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 ); -
src/wp-includes/pluggable.php
1142 1142 1143 1143 if ( ! $result && ! ( -1 === $action && strpos( $referer, $adminurl ) === 0 ) ) { 1144 1144 wp_nonce_ays( $action ); 1145 die();1145 wp_die(); 1146 1146 } 1147 1147 1148 1148 return $result; … … 1197 1197 if ( wp_doing_ajax() ) { 1198 1198 wp_die( -1, 403 ); 1199 1199 } else { 1200 die( '-1' );1200 wp_die( '-1' ); 1201 1201 } 1202 1202 } 1203 1203 -
src/wp-includes/rest-api.php
312 312 $server->serve_request( $route ); 313 313 314 314 // We're done. 315 die();315 wp_die(); 316 316 } 317 317 318 318 /** -
src/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() ) { ?> -
src/wp-includes/wp-db.php
1675 1675 // Load custom DB error template, if present. 1676 1676 if ( file_exists( WP_CONTENT_DIR . '/db-error.php' ) ) { 1677 1677 require_once WP_CONTENT_DIR . '/db-error.php'; 1678 die();1678 wp_die(); 1679 1679 } 1680 1680 1681 1681 $message = '<h1>' . __( 'Error establishing a database connection' ) . "</h1>\n"; -
src/wp-settings.php
542 542 $file = ms_site_check(); 543 543 if ( true !== $file ) { 544 544 require $file; 545 die();545 wp_die(); 546 546 } 547 547 unset( $file ); 548 548 } -
src/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(); -
src/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.