diff --git a/classes/class-truelayer-logger.php b/classes/class-truelayer-logger.php index ee9fdba..175a42a 100644 --- a/classes/class-truelayer-logger.php +++ b/classes/class-truelayer-logger.php @@ -72,12 +72,19 @@ public static function format_log( $truelayer_order_id, $method, $title, $reques if ( ! is_wp_error( $response ) && isset( $response['OrderHtmlSnippet'] ) ) {// todo check snippet. unset( $response['OrderHtmlSnippet'] ); } + // Unset the snippet to prevent issues in the request body. if ( isset( $request_args['body'] ) ) { - $request_body = json_decode( $request_args['body'], true ); - if ( isset( $request_body['OrderHtmlSnippet'] ) ) { - unset( $request_body['OrderHtmlSnippet'] ); - $request_args['body'] = wp_json_encode( $request_body ); + $request_body = json_decode($request_args['body'], true); + + if (isset($request_body['OrderHtmlSnippet'])) { + unset($request_body['OrderHtmlSnippet']); + $request_args['body'] = wp_json_encode($request_body); + } + + if (isset($request_body['client_secret'])) { + unset($request_body['client_secret']); + $request_args['body'] = wp_json_encode($request_body); } } diff --git a/readme.txt b/readme.txt index f7349d7..177be47 100644 --- a/readme.txt +++ b/readme.txt @@ -8,7 +8,7 @@ WC requires at least: 6.0.0 WC tested up to: 7.6.1 License: GPLv3 License URI: http://www.gnu.org/licenses/gpl-3.0.html -Stable tag: 1.2.0 +Stable tag: 1.2.1 TrueLayer for WooCommerce is a plugin that extends WooCommerce, allowing you to take payments via TrueLayer. @@ -54,6 +54,9 @@ More information on how to get started can be found in the [plugin documentation 6. Read more about the configuration process in the [plugin documentation](https://docs.krokedil.com/truelayer-for-woocommerce/). == CHANGELOG == += 2023.09.15 - version 1.2.1 = +* Fix - Remove sensitive data from logs + = 2023.05.08 - version 1.2.0 = * Feature - Added support for embedded payment page for the checkout as a option. * Feature - Add customer address to the create payment request if we have any. diff --git a/truelayer-for-woocommerce.php b/truelayer-for-woocommerce.php index e4a3bec..62a78ef 100644 --- a/truelayer-for-woocommerce.php +++ b/truelayer-for-woocommerce.php @@ -5,7 +5,7 @@ * Description: TrueLayer for WooCommerce. * Author: Krokedil * Author URI: https://krokedil.com/ - * Version: 1.2.0 + * Version: 1.2.1 * Text Domain: truelayer-for-woocommerce * Domain Path: /languages * @@ -29,7 +29,7 @@ define( 'TRUELAYER_WC_MAIN_FILE', __FILE__ ); define( 'TRUELAYER_WC_PLUGIN_PATH', untrailingslashit( plugin_dir_path( __FILE__ ) ) ); define( 'TRUELAYER_WC_PLUGIN_URL', untrailingslashit( plugin_dir_url( __FILE__ ) ) ); -define( 'TRUELAYER_WC_PLUGIN_VERSION', '1.2.0' ); +define( 'TRUELAYER_WC_PLUGIN_VERSION', '1.2.1' ); if ( ! class_exists( 'TrueLayer_For_WooCommerce' ) ) { /**