Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is decoding of "segmented" sections intentionally permissive? #25

Open
matt-martin opened this issue Jun 2, 2023 · 0 comments
Open

Comments

@matt-martin
Copy link

The spec for the US National section says: "The core segment must always be present". But I'm able to decode GPP strings that don't explicitly include data for the core segment. Is this expected/desired?

Here are some examples...

DBABLA~ decodes as:

{"uspnatv1":{"Version":1,"SharingNotice":0,"SaleOptOutNotice":0,"SharingOptOutNotice":0,"TargetedAdvertisingOptOutNotice":0,"SensitiveDataProcessingOptOutNotice":0,"SensitiveDataLimitUseNotice":0,"SaleOptOut":0,"SharingOptOut":0,"TargetedAdvertisingOptOut":0,"SensitiveDataProcessing":[0,0,0,0,0,0,0,0,0,0,0,0],"KnownChildSensitiveDataConsents":[0,0],"PersonalDataConsents":0,"MspaCoveredTransaction":0,"MspaOptOutOptionMode":0,"MspaServiceProviderMode":0,"GpcSegmentType":1,"Gpc":false}}

DBABLA~YA decodes as:

{"uspnatv1":{"Version":1,"SharingNotice":0,"SaleOptOutNotice":0,"SharingOptOutNotice":0,"TargetedAdvertisingOptOutNotice":0,"SensitiveDataProcessingOptOutNotice":0,"SensitiveDataLimitUseNotice":0,"SaleOptOut":0,"SharingOptOut":0,"TargetedAdvertisingOptOut":0,"SensitiveDataProcessing":[0,0,0,0,0,0,0,0,0,0,0,0],"KnownChildSensitiveDataConsents":[0,0],"PersonalDataConsents":0,"MspaCoveredTransaction":0,"MspaOptOutOptionMode":0,"MspaServiceProviderMode":0,"GpcSegmentType":1,"Gpc":true}}

DBABLA~YA.YA decodes as:

{"uspnatv1":{"Version":1,"SharingNotice":0,"SaleOptOutNotice":0,"SharingOptOutNotice":0,"TargetedAdvertisingOptOutNotice":0,"SensitiveDataProcessingOptOutNotice":0,"SensitiveDataLimitUseNotice":0,"SaleOptOut":0,"SharingOptOut":0,"TargetedAdvertisingOptOut":0,"SensitiveDataProcessing":[0,0,0,0,0,0,0,0,0,0,0,0],"KnownChildSensitiveDataConsents":[0,0],"PersonalDataConsents":0,"MspaCoveredTransaction":0,"MspaOptOutOptionMode":0,"MspaServiceProviderMode":0,"GpcSegmentType":1,"Gpc":true}}

DBABLA~YA.QA decodes as:

{"uspnatv1":{"Version":1,"SharingNotice":0,"SaleOptOutNotice":0,"SharingOptOutNotice":0,"TargetedAdvertisingOptOutNotice":0,"SensitiveDataProcessingOptOutNotice":0,"SensitiveDataLimitUseNotice":0,"SaleOptOut":0,"SharingOptOut":0,"TargetedAdvertisingOptOut":0,"SensitiveDataProcessing":[0,0,0,0,0,0,0,0,0,0,0,0],"KnownChildSensitiveDataConsents":[0,0],"PersonalDataConsents":0,"MspaCoveredTransaction":0,"MspaOptOutOptionMode":0,"MspaServiceProviderMode":0,"GpcSegmentType":1,"Gpc":false}}

The code just uses default values if the string doesn't have any data for the core segment. And if any segment is specified more than once, the last value wins (e.g. in the string "YA.QA", Gpc is false because "QA"--which corresponds to the bit string "010000000000"--comes after "YA"--which corresponds to the bit string "011000000000").

My initial expectation based on the spec was that these strings would be rejected as invalid, but that might just be me. If this is deemed to be undesirable/unexpected behavior, it's worth noting that other sections besides the US National section have the same behavior.

@matt-martin matt-martin changed the title Is decoding of "segment" sections intentionally permissive? Is decoding of "segmented" sections intentionally permissive? Jun 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant