File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -1073,18 +1073,20 @@ public function fulfill_order( $entry ) {
1073
1073
* @return void
1074
1074
*/
1075
1075
public function maybe_display_confirmation () {
1076
- if ( ! filter_has_var ( INPUT_GET , 'pay_confirmation ' ) ) {
1076
+ // phpcs:disable WordPress.Security.NonceVerification.Recommended
1077
+ if ( ! \array_key_exists ( 'pay_confirmation ' , $ _GET ) ) {
1077
1078
return ;
1078
1079
}
1079
1080
1080
- // Verify hash.
1081
- if ( ! filter_has_var ( INPUT_GET , 'hash ' ) ) {
1081
+ $ payment_id = (int ) \sanitize_text_field ( \wp_unslash ( $ _GET ['pay_confirmation ' ] ) );
1082
+
1083
+ if ( ! \array_key_exists ( 'hash ' , $ _GET ) ) {
1082
1084
return ;
1083
1085
}
1084
1086
1085
- $ hash = \sanitize_text_field ( \wp_unslash ( filter_input ( INPUT_GET , 'hash ' ) ) );
1087
+ $ hash = \sanitize_text_field ( \wp_unslash ( $ _GET [ 'hash ' ] ) );
1086
1088
1087
- $ payment_id = filter_input ( INPUT_GET , ' pay_confirmation ' , FILTER_SANITIZE_NUMBER_INT );
1089
+ // phpcs:enable WordPress.Security.NonceVerification.Recommended
1088
1090
1089
1091
if ( \wp_hash ( $ payment_id ) !== $ hash ) {
1090
1092
return ;
You can’t perform that action at this time.
0 commit comments