From 334a8b7da79eb091acc9ff045e81c1a2864f470d Mon Sep 17 00:00:00 2001 From: Ruben Rodriguez Date: Thu, 13 Sep 2018 13:36:30 -0400 Subject: [PATCH] Disabled blacklisting ipv6, RT#1318914 --- CRM/Core/Payment/TrustCommerce.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CRM/Core/Payment/TrustCommerce.php b/CRM/Core/Payment/TrustCommerce.php index ac1f36b..1ee3ad8 100644 --- a/CRM/Core/Payment/TrustCommerce.php +++ b/CRM/Core/Payment/TrustCommerce.php @@ -373,6 +373,10 @@ class CRM_Core_Payment_TrustCommerce extends CRM_Core_Payment { // TODO: fix DB calls to be more the CiviCRM way $ip = $_SERVER['REMOTE_ADDR']; $agent = $_SERVER['HTTP_USER_AGENT']; + # Disable on IPv6 + if ( strpos(":", $ip) !== false ){ + return TRUE; + } $ip = ip2long($ip); $blacklist = array(); $dao = CRM_Core_DAO::executeQuery('SELECT * FROM `trustcommerce_blacklist`'); -- 2.25.1