Make WordPress Core


Ignore:
Timestamp:
12/13/2018 01:39:08 AM (8 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.8 branch.

Location:
branches/4.8
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.8

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

    r44052 r44055  
    190190        // Update the thumbnail filename
    191191        $newmeta = wp_get_attachment_metadata( $post_id, true );
    192         $newmeta['thumb'] = $_POST['thumb'];
     192        $newmeta['thumb'] = wp_basename( $_POST['thumb'] );
    193193
    194194        wp_update_attachment_metadata( $post_id, $newmeta );
Note: See TracChangeset for help on using the changeset viewer.