WordPress.org

WordPRess GSoC Trac

Opened 9 months ago

Closed 9 months ago

#344 closed defect (fixed)

/posts/0 returns the latest post

Reported by: rmccue Owned by: rmccue
Milestone: 2013 Final (1.0) Priority: major
Component: JSON REST API Keywords:
Cc:

Description

The getPost endpoint is missing a check for the ID parameter before calling get_post(), so passing in an ID of 0 will retrieve the latest post rather than returning an error.

Change History (1)

comment:1 rmccue9 months ago

  • Owner set to rmccue
  • Resolution set to fixed
  • Status changed from new to closed

In 2194:

Give an error on getPost(0)

Fixes #344

Note: See TracTickets for help on using tickets.