From 42a30bae989f65b31eb3dae41604f0e4c4dd6f6b Mon Sep 17 00:00:00 2001 From: iglocska Date: Thu, 11 Aug 2022 15:25:53 +0200 Subject: [PATCH] fix: [warnings] added tlp:clear and tlp:amber+strict to the valid tlp tags - Clearly, the new tags should be accomodated... - ... though these ones do not spark joy. --- app/Lib/EventWarning/DefaultWarning.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Lib/EventWarning/DefaultWarning.php b/app/Lib/EventWarning/DefaultWarning.php index e7d057cd3..d6c347b2e 100644 --- a/app/Lib/EventWarning/DefaultWarning.php +++ b/app/Lib/EventWarning/DefaultWarning.php @@ -63,7 +63,7 @@ class DefaultWarning { $lowerTagName = trim(strtolower($tagName)); if (substr($lowerTagName, 0, 4) === 'tlp:') { - if (!in_array($lowerTagName, ['tlp:white', 'tlp:green', 'tlp:amber', 'tlp:red', 'tlp:ex:chr'], true)) { + if (!in_array($lowerTagName, ['tlp:white', 'tlp:green', 'tlp:amber', 'tlp:red', 'tlp:ex:chr', 'tlp:clear', 'tlp:amber+strict'], true)) { $warnings['TLP'][] = __('Unknown TLP tag, please refer to the TLP taxonomy as to what is valid, otherwise filtering rules created by your partners may miss your intent.'); } else if ($lowerTagName !== $tagName) { $warnings['TLP'][] = __('TLP tag with invalid formatting: Make sure that you only use TLP tags from the taxonomy. Custom tags with invalid capitalisation, white spaces or other artifacts will break synchronisation and filtering rules intended for the correct taxonomy derived tags.');