[MOSS] CIV-01-001 - Add security check to ensure full deletion
authorTim Otten <totten@civicrm.org>
Fri, 3 Apr 2020 02:44:51 +0000 (19:44 -0700)
committerSeamus Lee <seamuslee001@gmail.com>
Sat, 11 Apr 2020 20:49:43 +0000 (06:49 +1000)
Some admin workflows don't handle implicit deletions. This guard ensures that deletion is complete.

CRM/Utils/Check/Component/Security.php

index 3a17c834fdcb41033163a986e1e32ce0538fa7cc..2c79192a25d96f40f64a935331a2457f59b8fc19 100644 (file)
@@ -223,6 +223,16 @@ class CRM_Utils_Check_Component_Security extends CRM_Utils_Check_Component {
         "{$civicrm_root}/packages/html2text/class.html2text.inc",
         \Psr\Log\LogLevel::CRITICAL,
       ],
+      [
+        // MOSS CIV-01-002: The "demo.html" is problematic. Other unnecessary files should be deleted as a precaution. Consider deleting the folder and re-running 'composer install'.
+        Civi::paths()->getPath('[civicrm.bower]/google-code-prettify/styles/demo.html'),
+        \Psr\Log\LogLevel::CRITICAL,
+      ],
+      [
+        // MOSS CIV-01-002: Certain QUnit addons are problematic. Other unnecessary files should be deleted as a precaution. Consider deleting the folder and re-running 'composer install'.
+        Civi::paths()->getPath('[civicrm.bower]/qunit/addons'),
+        \Psr\Log\LogLevel::CRITICAL,
+      ],
     ];
     foreach ($files as $file) {
       if (file_exists($file[0])) {