Skip to content

Commit 403f204

Browse files
author
Julien Maury
authored
fix undefined uid
1 parent 80c54cd commit 403f204

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

classes/helpers/class-nonces.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public static function verify_nonce( $nonce, $action = -1 ) {
6666
}
6767

6868
// Nonce generated 12-24 hours ago
69-
$expected = substr( wp_hash( 'member-'.( $i - 1 ) . '|' . $action . '|' . $uid . '|' . $token, 'nonce' ), -12, 10 );
69+
$expected = substr( wp_hash( 'member-'.( $i - 1 ) . '|' . $action . '|' . $mid . '|' . $token, 'nonce' ), -12, 10 );
7070
if ( hash_equals( $expected, $nonce ) ) {
7171
return 2;
7272
}
@@ -246,4 +246,4 @@ public static function get_session_token() {
246246
$cookie = MPT_Member_Auth::parse_auth_cookie( '', 'logged_in' );
247247
return ! empty( $cookie['token'] ) ? $cookie['token'] : '';
248248
}
249-
}
249+
}

0 commit comments

Comments
 (0)