Propper verify nonce use on edit account.

This commit is contained in:
Gerhard 2014-10-21 08:53:54 +02:00
parent 817e23a807
commit a08b501ebc
1 changed files with 1 additions and 5 deletions

View File

@ -141,11 +141,7 @@ class WC_Form_Handler {
return;
}
if ( empty( $_POST[ 'action' ] ) || ( 'save_account_details' !== $_POST[ 'action' ] ) || empty( $_POST['_wpnonce'] ) ) {
return;
}
if ( ! wp_verify_nonce( $_POST['_wpnonce'], 'save_account_details' ) ) {
if ( empty( $_POST[ 'action' ] ) || ( 'save_account_details' !== $_POST[ 'action' ] ) || empty( $_POST['_wpnonce'] ) && wp_verify_nonce( $_POST['_wpnonce'], 'save_account_details' ) ) {
return;
}