mirror of
https://github.com/itflow-org/itflow
synced 2026-11-29 15:48:59 +00:00
Security: scope set_recurring_payment to the client's own invoice and payment method
This commit is contained in:
@@ -567,10 +567,16 @@ if (isset($_POST['set_recurring_payment'])) {
|
||||
saved_payment_description FROM payment_providers
|
||||
LEFT JOIN client_saved_payment_methods ON saved_payment_provider_id = payment_provider_id
|
||||
WHERE saved_payment_id = $saved_payment_id
|
||||
AND saved_payment_client_id = $client_id
|
||||
");
|
||||
|
||||
$row = mysqli_fetch_assoc($sql);
|
||||
|
||||
if (!$row) {
|
||||
flashAlert("Payment method not found for this client.", 'error');
|
||||
redirect();
|
||||
}
|
||||
|
||||
$provider_id = intval($row['payment_provider_id']);
|
||||
$provider_name = escapeSql($row['payment_provider_name']);
|
||||
$account_id = intval($row['payment_provider_account']);
|
||||
|
||||
Reference in New Issue
Block a user