Make WordPress Core

Opened 3 months ago

Last modified 3 months ago

#41387 new defect (bug)

Avoid 403's from AJAX requests from postbox.js

Reported by: bobbingwide Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: trunk
Component: Administration Keywords: has-patch
Focuses: Cc:


While making some improvements to a plugin's admin pages I changed the HTML in my meta boxes to be more inline with WordPress core. I then noticed that I was getting 403's from the closed-postboxes AJAX request each time I toggled the display of the postbox.

Since I don't have a requirement for the open/closed state of my postboxes to persist I don't need the AJAX requests. Consequently I don't have a #closedpostboxesnonce.

So, to avoid the 403's I changed postbox.js to not perform the AJAX request if the nonce isn't set.

Attachments (1)

41387.patch (819 bytes) - added by bobbingwide 3 months ago.
Don't post the AJAX request if there isn't a nonce

Download all attachments as: .zip

Change History (2)

3 months ago

Don't post the AJAX request if there isn't a nonce

#1 @bobbingwide
3 months ago

  • Keywords has-patch added
Note: See TracTickets for help on using tickets.