From 4db5ae6578d9509f6a484c7008e5b1d87826cf7d Mon Sep 17 00:00:00 2001 From: Patrick McCann Date: Fri, 26 Apr 2024 12:53:12 -0400 Subject: [PATCH] ConsentManagementGpp module: throw error on some invalid sections (#11385) * Update consentManagementGpp.js * Update consentManagementGpp.js * Update consentManagementGpp.js * Update consentManagementGpp.js * Update modules/consentManagementGpp.js Co-authored-by: Demetrio Girardi --------- Co-authored-by: Demetrio Girardi --- modules/consentManagementGpp.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/consentManagementGpp.js b/modules/consentManagementGpp.js index 416430fb1c9..a7bbca62205 100644 --- a/modules/consentManagementGpp.js +++ b/modules/consentManagementGpp.js @@ -423,6 +423,11 @@ function processCmpData(consentData) { ) { throw new GPPError('CMP returned unexpected value during lookup process.', consentData); } + ['usnatv1', 'uscav1'].forEach(section => { + if (consentData?.parsedSections?.[section]) { + logWarn(`Received invalid section from cmp: '${section}'. Some functionality may not work as expected`, consentData) + } + }) return storeConsentData(consentData); }