WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#13904 closed defect (bug) (fixed)

wp_get_single_post and wp_update_post assume post properties

Reported by: filosofo Owned by: filosofo
Milestone: 3.0.1 Priority: normal
Severity: normal Version: 3.0
Component: Posts, Post Types Keywords: has-patch
Focuses: Cc:

Description

wp_update_post and wp_get_single_post assume both that the post object they try to retrieve exists and that it has certain properties.

Theses assumptions do not always hold true, as sometimes, for example one can pass arguments to wp_update_post to create a new post object.

Patch does sanity checks for post object properties.

Attachments (1)

allow-new-post-objects.13904.diff (980 bytes) - added by filosofo 4 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 filosofo4 years ago

  • Owner set to filosofo
  • Status changed from new to accepted

comment:2 kevinB4 years ago

  • Cc kevinB added

comment:3 ryan4 years ago

  • Resolution set to fixed
  • Status changed from accepted to closed

(In [15405]) Sanity check properties in wp_get_single_post(). Props filosofo. fixes #13904 for 3.1

comment:4 ryan4 years ago

(In [15406]) Sanity check properties in wp_get_single_post(). Props filosofo. fixes #13904 for 3.0.1

Note: See TracTickets for help on using tickets.