v1.6.7
This commit is contained in:
parent
f9c073a582
commit
c3f0eac50c
1 changed files with 84 additions and 14 deletions
|
|
@ -858,6 +858,20 @@ class Profile_Settings {
|
|||
$nonce = sanitize_text_field( wp_unslash( $_POST[ self::NONCE_FIELD ] ) );
|
||||
|
||||
if ( ! wp_verify_nonce( $nonce, self::NONCE_ACTION ) ) {
|
||||
/*
|
||||
* A stale form (nonce expired) previously returned silently, which
|
||||
* left wizard-trapped users clicking Save with no visible result
|
||||
* while the setup-required redirect kept bouncing them back to the
|
||||
* profile. Fail loudly so the user knows to try again.
|
||||
*/
|
||||
$this->focus_section = true;
|
||||
add_settings_error(
|
||||
'robotstxt-2fa',
|
||||
'robotstxt-2fa-nonce-expired',
|
||||
__( 'Your form session expired and nothing was saved. Please try saving again.', 'robotstxt-2fa' ),
|
||||
'error'
|
||||
);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue