Make WordPress Core

Opened 17 months ago

#57395 new enhancement

Improve wp_die message when previewing post revision with expired nonce and unauthenticated requests

Reported by: dunhakdis's profile dunhakdis Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 6.1.1
Component: Revisions Keywords: has-patch
Focuses: Cc:

Description

For example, when viewing a revision with an expired nonce, http://localhost/sample-page/?preview_id=2&preview_nonce=07cb875d46&preview=true, a message "Sorry, you are not allowed to preview drafts". This works okay. However, the same message with the same status code (403) is being sent when viewing as an unauthenticated user (logged out).

Would it be a good enhancement if we revised the status code and message a bit for a logged-out user?

Thanks

Attachments (1)

57395.diff (860 bytes) - added by dunhakdis 17 months ago.
Improves post preview messages for expired nonce and unauthenticated users

Download all attachments as: .zip

Change History (1)

@dunhakdis
17 months ago

Improves post preview messages for expired nonce and unauthenticated users

Note: See TracTickets for help on using tickets.