Propper verify nonce use on edit account.
This commit is contained in:
parent
817e23a807
commit
a08b501ebc
|
@ -141,11 +141,7 @@ class WC_Form_Handler {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( empty( $_POST[ 'action' ] ) || ( 'save_account_details' !== $_POST[ 'action' ] ) || empty( $_POST['_wpnonce'] ) ) {
|
if ( empty( $_POST[ 'action' ] ) || ( 'save_account_details' !== $_POST[ 'action' ] ) || empty( $_POST['_wpnonce'] ) && wp_verify_nonce( $_POST['_wpnonce'], 'save_account_details' ) ) {
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( ! wp_verify_nonce( $_POST['_wpnonce'], 'save_account_details' ) ) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue