WordPress.org

Make WordPress Core


Ignore:
Timestamp:
12/13/2018 01:37:30 AM (3 years ago)
Author:
pento
Message:

Editor: Remove unwanted fields before saving posts.

The meta_input, file, and guid fields are not intended to be updated through user input.

Merges [44047] to the 4.9 branch.

Location:
branches/4.9
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.9

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

    r44051 r44053  
    191191    // Update the thumbnail filename
    192192    $newmeta = wp_get_attachment_metadata( $post_id, true );
    193     $newmeta['thumb'] = $_POST['thumb'];
     193    $newmeta['thumb'] = wp_basename( $_POST['thumb'] );
    194194
    195195    wp_update_attachment_metadata( $post_id, $newmeta );
Note: See TracChangeset for help on using the changeset viewer.