From 44d3306f280cc7d6daa718d2a9f6323e48f54616 Mon Sep 17 00:00:00 2001 From: rrandomsky Date: Thu, 14 Dec 2023 10:19:15 +0100 Subject: [PATCH] [CP-1059] Fix for erase only sensitive data from logs Added omitted anonymization for the COPS command. --- module-utils/utility/Anonymize.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/module-utils/utility/Anonymize.cpp b/module-utils/utility/Anonymize.cpp index 99a0ffeff6d7949455dc697032a354bae78b7b3d..a97f5626e278ea9e5d0cf0d4ac15fbb6d11986a0 100644 --- a/module-utils/utility/Anonymize.cpp +++ b/module-utils/utility/Anonymize.cpp @@ -19,6 +19,7 @@ namespace utils::anonymize constexpr auto cellularSubstringATD = "ATD"; constexpr auto cellularSubstringCPBR = "CPBR"; constexpr auto cellularSubstringCSPN = "CSPN"; + constexpr auto cellularSubstringCOPS = "COPS"; std::string anonymizeInQuotationMarks(const std::string &textToAnonymize, std::size_t singsToLeaveAtEnd) { @@ -129,6 +130,8 @@ namespace utils::anonymize {cellularSubstringCPBR, [&text]() { return anonymizeInQuotationMarks(text, SIGNS_TO_LEAVE_FOR_PHONE_NUMBERS); }}, {cellularSubstringCSPN, + [&text]() { return anonymizeInQuotationMarks(text, SIGNS_TO_LEAVE_FOR_NET_PROVIDER_NAME); }}, + {cellularSubstringCOPS, [&text]() { return anonymizeInQuotationMarks(text, SIGNS_TO_LEAVE_FOR_NET_PROVIDER_NAME); }}}; for (const auto &[key, anonymizeFunction] : anonymizeOption) {