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

Fixed an issue where Web SDK failed to read cross domain identities when there were multiple adobe_mc query string parameters #1091

Merged
merged 2 commits into from
Jan 8, 2024

Conversation

jonsnyder
Copy link
Contributor

Description

When multiple adobe_mc parameters were specified, the URL parsing function returns an array for that parameter. This code accepts the array and uses the last value. Additionally, it logs a warning when this happens.

Related Issue

adobe/reactor-extension-alloy#346
https://jira.corp.adobe.com/browse/PDCL-11037

Motivation and Context

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Improvement (non-breaking change which does not add functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA or I'm an Adobe employee.
  • I have made any necessary test changes and all tests pass.
  • I have run the Sandbox successfully.

if (queryStringValue === undefined) {
return;
}
if (Array.isArray(queryStringValue)) {
Copy link
Contributor

@jfkhoury jfkhoury Jan 2, 2024

Choose a reason for hiding this comment

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

Should we add a length check as well? Or will queryStringValue only be of type Array if it contains multiple adobe_mc?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes.
0 instances - undefined
1 instance - string
2 or more - array

@jonsnyder jonsnyder merged commit 5ed2edb into main Jan 8, 2024
2 of 3 checks passed
@jonsnyder jonsnyder deleted the multiAdobeMCParams branch January 8, 2024 23:08
@jonsnyder jonsnyder changed the title Added support for multiple adobe_mc parameters. Fixed an issue where Web SDK failed to read cross domain identities when there were multiple adobe_mc query string parameters Jan 8, 2024
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.

None yet

3 participants