From e83c8ab54544a3fad6f3783e52ee56906d6fc972 Mon Sep 17 00:00:00 2001 From: Max Golovanov Date: Mon, 5 Jun 2023 22:09:02 -0700 Subject: [PATCH] Update EventPropertiesDecorator.hpp Scrub IP addresses by default. --- lib/decorators/EventPropertiesDecorator.hpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/decorators/EventPropertiesDecorator.hpp b/lib/decorators/EventPropertiesDecorator.hpp index 95ef92304..7de12eedb 100644 --- a/lib/decorators/EventPropertiesDecorator.hpp +++ b/lib/decorators/EventPropertiesDecorator.hpp @@ -24,6 +24,7 @@ namespace MAT_NS_BEGIN { #define RECORD_FLAGS_EVENTTAG_HASH_PII 0x00100000 // #define MICROSOFT_EVENTTAG_DROP_PII 0x02000000 #define RECORD_FLAGS_EVENTTAG_DROP_PII 0x00200000 +#define RECORD_FLAGS_EVENTTAG_SCRUB_IP 0x00400000 class EventPropertiesDecorator : public IDecorator { @@ -124,6 +125,8 @@ namespace MAT_NS_BEGIN { int64_t tags = eventProperties.GetPolicyBitFlags(); int64_t flags = 0; + // Scrub/obfuscate IP addresses. + flags = RECORD_FLAGS_EVENTTAG_SCRUB_IP; // We must remap from one bitfield set to another, no way to bit-shift :( // At the moment 1DS SDK in direct upload mode supports DROP and MARK tags only: flags |= (tags & MICROSOFT_EVENTTAG_MARK_PII) ? RECORD_FLAGS_EVENTTAG_MARK_PII : 0;