From db0e155c009569268b0e46bf3855221e968133f0 Mon Sep 17 00:00:00 2001 From: Seamus Lee Date: Fri, 12 Apr 2019 07:59:12 +1000 Subject: [PATCH] Disable phpcs checking in the Crypt files where mcrypt functions are --- CRM/Utils/Crypt.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CRM/Utils/Crypt.php b/CRM/Utils/Crypt.php index 688a3229ab..cfd7b09b9a 100644 --- a/CRM/Utils/Crypt.php +++ b/CRM/Utils/Crypt.php @@ -55,6 +55,7 @@ class CRM_Utils_Crypt { if (function_exists('mcrypt_module_open') && defined('CIVICRM_SITE_KEY') ) { + // phpcs:disable $td = mcrypt_module_open(MCRYPT_RIJNDAEL_256, '', MCRYPT_MODE_ECB, ''); // ECB mode - iv not needed - CRM-8198 $iv = '00000000000000000000000000000000'; @@ -66,6 +67,7 @@ class CRM_Utils_Crypt { mcrypt_generic_deinit($td); mcrypt_module_close($td); } + // phpcs:enable return base64_encode($string); } @@ -94,6 +96,7 @@ class CRM_Utils_Crypt { if (function_exists('mcrypt_module_open') && defined('CIVICRM_SITE_KEY') ) { + // phpcs:disable $td = mcrypt_module_open(MCRYPT_RIJNDAEL_256, '', MCRYPT_MODE_ECB, ''); // ECB mode - iv not needed - CRM-8198 $iv = '00000000000000000000000000000000'; @@ -104,6 +107,7 @@ class CRM_Utils_Crypt { $string = rtrim(mdecrypt_generic($td, $string)); mcrypt_generic_deinit($td); mcrypt_module_close($td); + // phpcs:enable } return $string; -- 2.25.1