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

CA privacy string breaking #42

Open
holstein-rathlou opened this issue Nov 8, 2023 · 0 comments
Open

CA privacy string breaking #42

holstein-rathlou opened this issue Nov 8, 2023 · 0 comments

Comments

@holstein-rathlou
Copy link

holstein-rathlou commented Nov 8, 2023

While learning how to use your code, I was testing it on the following example GPP string: DBABjw~CPXxRfAPXxRfAAfKABENB-CgAAAAAAAAAAYgAAAAAAAA~1YNN, downloaded from here.
I try to create a new GPPString from this by saying: val gppModel = new GppModel(iabgpp) and the code then breaks with the following message:

[error]    com.iab.gpp.encoder.error.DecodingException: Unable to decode VendorExpressConsent (AbstractEncodableSegmentedBitStringSection.java:79)
[error] com.iab.gpp.encoder.section.AbstractEncodableSegmentedBitStringSection.decodeSegmentsFromBitStrings(AbstractEncodableSegmentedBitStringSection.java:79)
[error] com.iab.gpp.encoder.section.TcfCaV1.decode(TcfCaV1.java:173)
[error] com.iab.gpp.encoder.section.TcfCaV1.<init>(TcfCaV1.java:40)
[error] com.iab.gpp.encoder.GppModel.decode(GppModel.java:237)
[error] com.iab.gpp.encoder.GppModel.<init>(GppModel.java:33)
[error] com.liveintent.dwh.privacy.jobs.PrivacyRequestOptOutJobSpec.$anonfun$new$3(PrivacyRequestOptOutJobSpec.scala:47)
[error] com.iab.gpp.encoder.datatype.EncodableOptimizedFixedRange.substring(EncodableOptimizedFixedRange.java:70)
[error] com.iab.gpp.encoder.section.AbstractEncodableSegmentedBitStringSection.decodeSegmentsFromBitStrings(AbstractEncodableSegmentedBitStringSection.java:75)
[error] com.iab.gpp.encoder.section.TcfCaV1.decode(TcfCaV1.java:173)
[error] com.iab.gpp.encoder.section.TcfCaV1.<init>(TcfCaV1.java:40)
[error] com.iab.gpp.encoder.GppModel.decode(GppModel.java:237)
[error] com.iab.gpp.encoder.GppModel.<init>(GppModel.java:33)
[error] com.liveintent.dwh.privacy.jobs.PrivacyRequestOptOutJobSpec.$anonfun$new$3(PrivacyRequestOptOutJobSpec.scala:47)
[error] CAUSED BY
[error]  java.lang.StringIndexOutOfBoundsException: begin 199, end 1000, length 264 (EncodableOptimizedFixedRange.java:70)
[error] com.iab.gpp.encoder.datatype.EncodableOptimizedFixedRange.substring(EncodableOptimizedFixedRange.java:70)
[error] com.iab.gpp.encoder.section.AbstractEncodableSegmentedBitStringSection.decodeSegmentsFromBitStrings(AbstractEncodableSegmentedBitStringSection.java:75)
[error] com.iab.gpp.encoder.section.TcfCaV1.decode(TcfCaV1.java:173)
[error] com.iab.gpp.encoder.section.TcfCaV1.<init>(TcfCaV1.java:40)
[error] com.iab.gpp.encoder.GppModel.decode(GppModel.java:237)
[error] com.iab.gpp.encoder.GppModel.<init>(GppModel.java:33)

I cannot recreate the error through an encoding, and subsequent decoding, of a Canada Privacy string.

noirotm added a commit to noirotm/iabgpp-rs that referenced this issue Apr 14, 2024
This adds a test case from
IABTechLab/iabgpp-java#42.
This is basically an invalid example from the spec.

Also adds a test that tries to decode a TCF EU v2 string as a GPP
string, from IABTechLab/iabgpp-java#44.
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