User may have been able to access paid content while pending payment
-
Hello there pramadillo folks,
I am a sysadmin at a woocommerce site that deals with adult models and access to their content. We use pay-per-post free and authorize.net for payment processing. Today we had an international customer make a purchase and have it declined by Authorize.
After the decline, the transaction was set to payment_pending (which is a non-paid order status). I checked the server logs, and while things are a bit weird with tracking a user IP in nginx logs with cloudflare active, I believe this user was given access to the gallery when they should not have been.
Please understand that I am not AT ALL a php coder and I am spinning my wheels here.
I checked the source code of the plugin and code which seems like it would determine whether or not to grant access to a simple virtual is:
if ( wc_customer_bought_product( $this->current_user->user_email, $this->current_user->ID, trim( $id ) ) ) {
Checking wc_customer_bought_product() (https://woocommerce.github.io/code-reference/files/woocommerce-includes-wc-user-functions.html#source-view.309) seems to return an array on line 340 (https://woocommerce.github.io/code-reference/files/woocommerce-includes-wc-user-functions.html#source-view.340) which by default simply contains “processing”/”completed” (per this: https://woocommerce.github.io/code-reference/files/woocommerce-includes-wc-order-functions.html#source-view.124 )
I don’t see any alternative path that the user could have taken, but I also don’t see any other users that purchased this content in the same timeframe using the same user agent (chrome on Safari) and the site in question doesn’t have a GIANT userbase.
Can you please investigate if there is some other code path that could’ve been hit to allow for a payment_processing order to gain access to a hidden post?
Cheers,
- The topic ‘User may have been able to access paid content while pending payment’ is closed to new replies.