File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -529,7 +529,7 @@ public function redirect_url( $url, $payment ) {
529
529
$ url = add_query_arg (
530
530
[
531
531
'pay_confirmation ' => $ payment ->get_id (),
532
- '_wpnonce ' => wp_create_nonce ( ' gf_confirmation_payment_ ' . $ payment ->get_id () ),
532
+ 'hash ' => \wp_hash ( $ payment ->get_id () ),
533
533
],
534
534
$ lead ['source_url ' ]
535
535
);
@@ -1077,16 +1077,16 @@ public function maybe_display_confirmation() {
1077
1077
return ;
1078
1078
}
1079
1079
1080
- // Verify nonce .
1081
- if ( ! \array_key_exists ( ' _wpnonce ' , $ _GET ) ) {
1080
+ // Verify hash .
1081
+ if ( ! filter_has_var ( INPUT_GET , ' hash ' ) ) {
1082
1082
return ;
1083
1083
}
1084
1084
1085
- $ nonce = \sanitize_text_field ( \wp_unslash ( $ _GET [ ' _wpnonce ' ] ) );
1085
+ $ hash = \sanitize_text_field ( \wp_unslash ( filter_input ( INPUT_GET , ' hash ' ) ) );
1086
1086
1087
1087
$ payment_id = filter_input ( INPUT_GET , 'pay_confirmation ' , FILTER_SANITIZE_NUMBER_INT );
1088
1088
1089
- if ( ! wp_verify_nonce ( $ nonce , ' gf_confirmation_payment_ ' . $ payment_id ) ) {
1089
+ if ( \wp_hash ( $ payment_id ) !== $ hash ) {
1090
1090
return ;
1091
1091
}
1092
1092
You can’t perform that action at this time.
0 commit comments