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

String override initialization bug #4368

Merged
merged 3 commits into from
Oct 31, 2023

Conversation

allisonking
Copy link
Contributor

@allisonking allisonking commented Oct 31, 2023

Closes https://ethyca.atlassian.net/browse/PROD-1295

Description Of Changes

There was a bug where vendor IDs weren't being parsed from the fides_string to the cookie properly. The cookie expects these IDs to be prefixed by gvl (since all TCF vendors in the experience will be prefixed by gvl, and that allows updateExperienceFromCookieConsent to work properly) but the TC string has no concept of our prefixed IDs.

https://www.loom.com/share/81339746560b4f7cbae7200fd1e6470e?sid=9fc5ad92-130b-4886-8ce5-e1f3718793d3

Code Changes

  • Add a little bit of logic to add a gvl prefix when decoding from TC string to cookie
  • Update tests/fixtures to use id gvl.2 instead of 2 now that our backend has been changed to always send gvl prefixed IDs
  • Add test specific to this bug

Steps to Confirm

  • See repro steps in the ticket!

Pre-Merge Checklist

Copy link

cypress bot commented Oct 31, 2023

Passing run #4923 ↗︎

0 4 0 0 Flakiness 0
⚠️ You've recorded test results over your free plan limit.
Upgrade your plan to view test results.

Details:

Merge 3cf4d6f into 1a8f26b...
Project: fides Commit: 90b9ce5e2a ℹ️
Status: Passed Duration: 01:03 💡
Started: Oct 31, 2023 6:41 PM Ended: Oct 31, 2023 6:42 PM

Review all test suite changes for PR #4368 ↗︎

@allisonking allisonking marked this pull request as ready for review October 31, 2023 18:49
Copy link
Contributor

@eastandwestwind eastandwestwind left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@@ -1934,6 +1937,46 @@ describe("Fides-js TCF", () => {
expect(tcData.vendor.legitimateInterests).to.eql({});
});
});
it("can use a fides_string to override a vendor consent", () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🌟

@allisonking allisonking merged commit 628c7ea into main Oct 31, 2023
11 checks passed
@allisonking allisonking deleted the aking/prod-1295/string-override-initialization-bug branch October 31, 2023 19:02
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

Successfully merging this pull request may close these issues.

2 participants