Opened 5 years ago
Closed 5 years ago
#48076 closed defect (bug) (fixed)
Gutenberg 6.5: Add Nonce Endpoint
Reported by: | iseulde | Owned by: | iseulde |
---|---|---|---|
Milestone: | 5.3 | Priority: | normal |
Severity: | normal | Version: | 5.3 |
Component: | Editor | Keywords: | has-patch |
Focuses: | Cc: |
Description
This is a follow up to #47843.
See https://core.trac.wordpress.org/ticket/47843#comment:29.
I added the action that was added for the plugin in https://github.com/WordPress/gutenberg/pull/16683.
This can be tested by adding lowering the nonce life to 5 seconds. Load the page, then wait 5 seconds and try to update or publish a post.
<?php add_filter( 'nonce_life', function() { return 5; } );
Attachments (2)
Change History (5)
Note: See
TracTickets for help on using
tickets.
When testing, it is good to look at the network requests. Whenever the nonce expires, the REST API will return 403. A new nonce will be requested with the new action, and the original request will be remade.