Skip to content

Commit

Permalink
refactor: use give_maybe_safe_unserialize() on $user_info data
Browse files Browse the repository at this point in the history
  • Loading branch information
glaubersilva committed Sep 6, 2024
1 parent d7bb629 commit cfd74e4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion includes/process-donation.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
* Handles the donation form process.
*
* @access private
* @unreleased Use give_maybe_safe_unserialize() on $user_info data
* @since 1.0
*
* @throws ReflectionException Exception Handling.
Expand Down Expand Up @@ -151,12 +152,13 @@ function give_process_donation_form() {
);

// Setup donation information.
$user_info = array_map('give_maybe_safe_unserialize', stripslashes_deep( $user_info ));
$donation_data = [
'price' => $price,
'purchase_key' => $purchase_key,
'user_email' => $user['user_email'],
'date' => date( 'Y-m-d H:i:s', current_time( 'timestamp' ) ),
'user_info' => stripslashes_deep( $user_info ),
'user_info' => $user_info,
'post_data' => $post_data,
'gateway' => $valid_data['gateway'],
'card_info' => $valid_data['cc_info'],
Expand Down

0 comments on commit cfd74e4

Please sign in to comment.