Opened 2 years ago
Last modified 2 years ago
#16683 new defect (bug)
Nonce failure error message causes a warning, and also ugly error.
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Future Release |
| Component: | Administration | Version: | 3.1 |
| Severity: | normal | Keywords: | has-patch |
| Cc: |
Description
( ! ) Notice: Undefined offset: 4 in C:\www\wordpress-commit\wp-includes\functions.php on line 2624
Call Stack
# Time Memory Function Location
1 0.1991 455408 {main}( ) ..\options-permalink.php:0
2 15.8632 23506944 check_admin_referer( ) ..\options-permalink.php:69
3 15.8637 23507168 wp_nonce_ays( ) ..\pluggable.php:839
4 15.8638 23507240 wp_explain_nonce( ) ..\functions.php:2657
Your attempt to change your permalink structure to: has failed.
I left the permalink page open for a few hours, and just went to update it. Upon clicking update, I was given the above error (see attached jpeg). It feels pretty clunky and average to have a simple text like that.
The warning looks to be caused by the nonce error not being set possibly..
Attachments (4)
Change History (7)
solarissmoke — 2 years ago
comment:2
solarissmoke — 2 years ago
- Keywords has-patch added; needs-patch removed
It's because $trans['update']['permalink'] was expecting the permalink structure that was requested to be supplied in the _extra part of the nonce action - which is wrong as that is not a fixed ID.
As for clunky/average - all the messages in wp_explain_nonce are like that. I feel certain there is a ticket out there proposing an overhaul of the nonce/AYS business?
Related #15394
solarissmoke's patch doesn't address the root of the problem.
wp_explain_nonce assumes that all nonce action has an _extra part.
Reproducing this issue is easier if you add $result = false; after line 837 in check_admin_referer().
See 16683.2.2.diff .
Please ignore 16683.2.diff or delete it, there's a typo.

The test was of SVN @ 3.1 release revision.