mirror of
https://git.wownero.com/wownero/wownerowp.git
synced 2024-08-15 01:03:16 +00:00
Update monero_payments.php
This commit is contained in:
parent
d903b28353
commit
9fcf1cb1de
1 changed files with 2 additions and 2 deletions
|
@ -317,7 +317,7 @@ class Monero_Gateway extends WC_Payment_Gateway
|
|||
setcookie('payment_id', $payment_id, time() + 2700);
|
||||
} else{
|
||||
// Please fix this SQLI injection! TODO: Fix me!
|
||||
$payment_id = $_COOKIE['payment_id'];
|
||||
$payment_id = sanitize_text_field($_COOKIE['payment_id']);
|
||||
}
|
||||
return $payment_id;
|
||||
}
|
||||
|
@ -329,7 +329,7 @@ class Monero_Gateway extends WC_Payment_Gateway
|
|||
$create_table = "CREATE TABLE IF NOT EXISTS $payment_id (
|
||||
rate INT
|
||||
)";
|
||||
$wpdb->query($wpdb$create_table);
|
||||
$wpdb->query($create_table);
|
||||
$rows_num = $wpdb->get_results("SELECT count(*) as count FROM $payment_id");
|
||||
if ($rows_num[0]->count > 0) // Checks if the row has already been created or not
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue