From 3e9cf1c3a94d1aab929d90e5ebf91e9f5a695833 Mon Sep 17 00:00:00 2001 From: Mauricio Astudillo Toledo Date: Wed, 29 May 2024 16:26:38 -0400 Subject: [PATCH] feat: sanitize data from payment form --- .../PaymentGateways/WC_Gateway_Transbank_Oneclick_Mall_REST.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/src/PaymentGateways/WC_Gateway_Transbank_Oneclick_Mall_REST.php b/plugin/src/PaymentGateways/WC_Gateway_Transbank_Oneclick_Mall_REST.php index ba01826..bafa3de 100644 --- a/plugin/src/PaymentGateways/WC_Gateway_Transbank_Oneclick_Mall_REST.php +++ b/plugin/src/PaymentGateways/WC_Gateway_Transbank_Oneclick_Mall_REST.php @@ -338,7 +338,7 @@ public function form() */ private function handleRequest(array $request, WC_Order $order) { - $paymentTokenId = $request["wc-{$this->id}-payment-token"] ?? null; + $paymentTokenId = wc_clean($request["wc-{$this->id}-payment-token"]) ?? null; if ($paymentTokenId === 'new' || is_null($paymentTokenId)) { return $this->handleInscription($order);