Update monero_payments.php

This commit is contained in:
serhack 2017-11-22 18:23:05 +01:00 committed by GitHub
parent a959a97c2f
commit 882a923234
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -315,8 +315,10 @@ class Monero_Gateway extends WC_Payment_Gateway
if (!isset($_COOKIE['payment_id'])) { if (!isset($_COOKIE['payment_id'])) {
$payment_id = bin2hex(openssl_random_pseudo_bytes(8)); $payment_id = bin2hex(openssl_random_pseudo_bytes(8));
setcookie('payment_id', $payment_id, time() + 2700); setcookie('payment_id', $payment_id, time() + 2700);
} else } else{
$payment_id = sanitize_text_field($_COOKIE['payment_id']); // Please fix this SQLI injection! TODO: Fix me!
$payment_id = $_COOKIE['payment_id'];
}
return $payment_id; return $payment_id;
} }