From 390c0c256d7721af16ffaef68c9d3689103919ad Mon Sep 17 00:00:00 2001 From: Ruben Rodriguez Date: Fri, 28 May 2021 13:20:32 +0200 Subject: [PATCH] Improved externalParametersBlacklist --- CRM/Core/Payment/TrustCommerce.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/CRM/Core/Payment/TrustCommerce.php b/CRM/Core/Payment/TrustCommerce.php index dff990d..9e987cb 100644 --- a/CRM/Core/Payment/TrustCommerce.php +++ b/CRM/Core/Payment/TrustCommerce.php @@ -334,8 +334,17 @@ class CRM_Core_Payment_TrustCommerce extends CRM_Core_Payment { // fclose("$test-tc-log"); //} - if(file_exists('ParamsBlacklist.php')) - include 'ParamsBlacklist.php'; + $file=__DIR__ .'/ParamsBlacklist.php'; + if(file_exists($file)){ + require_once $file; + + $result=externalParametersBlacklist($tc_params); + if ($result[0] == TRUE){ + error_log("TrustCommerce: _isParamsBlacklisted() " . $result[1]); + return TRUE; + } + }else + error_log("TrustCommerce: missing ParamsBlacklist.php"); return FALSE; } -- 2.25.1