Make WordPress Core

Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#13904 closed defect (bug) (fixed)

wp_get_single_post and wp_update_post assume post properties

Reported by: filosofo's profile filosofo Owned by: filosofo's profile 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 15 years ago.

Download all attachments as: .zip

Change History (5)

#1 @filosofo
15 years ago

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

#2 @kevinB
15 years ago

  • Cc kevinB added

#3 @ryan
15 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

#4 @ryan
15 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.