Make WordPress Core

Opened 8 years ago

Closed 8 years ago

#39530 closed defect (bug) (worksforme)

When posting too many comments via API, the error response is HTML, not JSON

Reported by: martinmalinda's profile martinmalinda Owned by: joehoyle's profile joehoyle
Milestone: Priority: normal
Severity: normal Version: 4.7
Component: REST API Keywords: reporter-feedback
Focuses: Cc:

Description (last modified by SergeyBiryukov)

Basically it sends this HTML response:

<body id="error-page">
	<p>You are posting comments too quickly. Slow down.</p></body>
</html>

Change History (5)

#1 @rmccue
8 years ago

  • Component changed from General to REST API
  • Focuses rest-api removed

Thought we caught this previously. Basically, the underlying functions that the comment controller calls check for comment floods, then call wp_die.

#2 @SergeyBiryukov
8 years ago

  • Description modified (diff)

#3 @joehoyle
8 years ago

  • Milestone changed from Awaiting Review to 4.8
  • Owner set to joehoyle
  • Status changed from new to assigned

I'll try get a patch.

#4 @joehoyle
8 years ago

  • Keywords reporter-feedback added

I took a look into this and was unable to reproduce. I tested with anonymous users creating comment and verified the response is the expected:

{"code":"comment_flood","message":"You are posting comments too quickly. Slow down.","data":{"status":400}}

@martinmalinda could you attached the request details for the exact request you are making?

#5 @rmccue
8 years ago

  • Milestone 4.8 deleted
  • Resolution set to worksforme
  • Status changed from assigned to closed

Two weeks without reporter feedback, so closing this one out.

@martinmalinda If you can reproduce this on the latest version of trunk, please feel free to reopen!

Note: See TracTickets for help on using tickets.