Make WordPress Core


Ignore:
Timestamp:
12/13/2018 01:55:22 AM (6 years ago)
Author:
peterwilsoncc
Message:

Multisite: Validate activation links.

Merges [44048] to the 4.0 branch.

Location:
branches/4.0
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.0

  • branches/4.0/src/wp-admin/post.php

    r33545 r44069  
    1717wp_reset_vars( array( 'action' ) );
    1818
    19 if ( isset( $_GET['post'] ) )
     19if ( isset( $_GET['post'] ) && isset( $_POST['post_ID'] ) && (int) $_GET['post'] !== (int) $_POST['post_ID'] )
     20    wp_die( __( 'A post ID mismatch has been detected.' ), __( 'Sorry, you are not allowed to edit this item.' ), 400 );
     21elseif ( isset( $_GET['post'] ) )
    2022    $post_id = $post_ID = (int) $_GET['post'];
    2123elseif ( isset( $_POST['post_ID'] ) )
     
    8385}
    8486
     87if ( isset( $_POST['post_type'] ) && $post && $post_type !== $_POST['post_type'] ) {
     88    wp_die( __( 'A post type mismatch has been detected.' ), __( 'Sorry, you are not allowed to edit this item.' ), 400 );
     89}
     90
    8591if ( isset( $_POST['deletepost'] ) )
    8692    $action = 'delete';
Note: See TracChangeset for help on using the changeset viewer.