[wp-trac] [WordPress Trac] #13917: wp.uploadFile cannot be attached to any post
WordPress Trac
wp-trac at lists.automattic.com
Thu Mar 1 14:45:45 UTC 2012
#13917: wp.uploadFile cannot be attached to any post
-------------------------------------+-----------------------------
Reporter: ciprian_vb | Owner: josephscott
Type: task (blessed) | Status: assigned
Priority: normal | Milestone: Future Release
Component: XML-RPC | Version: 3.0
Severity: normal | Resolution:
Keywords: has-patch commit mobile |
-------------------------------------+-----------------------------
Comment (by ericmann):
Replying to [comment:9 markoheijnen]:
> Patch is fine with me. I only wonder if there should be a check if the
post id that is given does exists and it's post type is public (way it
works now in the back-end).
Actually, none of the references I can find to `wp_insert_attachment()`,
which is the method we're using to insert the attachment, check this.
They blindly pass along whatever `post_id` was passed in, which is
typically `$_REQUEST['post_id']` captured from somewhere else.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/13917#comment:10>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list