Skip to content

Commit c3c8718

Browse files
author
Julien Maury
authored
fix wrong $_POST nonce
it's _mptnonce not _wpnonce
1 parent c33b6f0 commit c3c8718

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

classes/shortcodes/class-shortcode-registration.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public static function check_step_1() {
7575
$mptr = wp_parse_args( $mptr, self::$form_fields );
7676

7777
// Check _NONCE
78-
$nonce = isset( $_POST['_wpnonce'] ) ? $_POST['_wpnonce'] : '';
78+
$nonce = isset( $_POST['_mptnonce'] ) ? $_POST['_mptnonce'] : '';
7979
if ( !mpt_verify_nonce( $nonce, 'mptregistration' ) ) {
8080
parent::set_message( 'check-nonce', 'Security check failed', 'error' );
8181
}
@@ -239,7 +239,7 @@ public static function check_step_2_url() {
239239
public static function check_step_2_form() {
240240
if ( isset( $_POST['mptregistration_s2'] ) ) {
241241
// Check _NONCE
242-
$nonce = isset( $_POST['_wpnonce'] ) ? $_POST['_wpnonce'] : '';
242+
$nonce = isset( $_POST['_mptnonce'] ) ? $_POST['_mptnonce'] : '';
243243
if ( !mpt_verify_nonce( $nonce, 'mptregistration_s2' ) ) {
244244
parent::set_message( 'check-nonce', 'Security check failed', 'error' );
245245
}

0 commit comments

Comments
 (0)