~aleteoryx/muditaos

44d3306f280cc7d6daa718d2a9f6323e48f54616 — rrandomsky 2 years ago 9ba4d8c pure_1.11.0 pure_1.11.0-rc.2
[CP-1059] Fix for erase only sensitive data from logs

Added omitted anonymization for the COPS command.
1 files changed, 3 insertions(+), 0 deletions(-)

M module-utils/utility/Anonymize.cpp
M module-utils/utility/Anonymize.cpp => module-utils/utility/Anonymize.cpp +3 -0
@@ 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) {