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

Fix missing 3rd party cookie when using POST requests #14368

Merged
merged 6 commits into from Jul 17, 2019

Conversation

MichaelRoosz
Copy link
Contributor

Added "xhr.withCredentials = true;" so that the third party cookie is included in POST requests.
Currently cookies are missing when using POST (xhr) requests.
This fixes visitor duplication when POST gets used.

This is the same change as in #13159 , but this time I have included a new test.

@Findus23 Findus23 added the Needs Review PRs that need a code review label Apr 23, 2019
@tsteur
Copy link
Member

tsteur commented Apr 23, 2019

Cheers @MichaelHeerklotz noticed a test fails on travis: https://travis-ci.org/matomo-org/matomo/jobs/523527419#L776-L776

Just fyi: Not every older (IE) browser supports withCredentials but that shouldn't be a problem (source https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/withCredentials). It won't break anything.

@mattab mattab added this to the 3.11.0 milestone Jun 10, 2019
@tsteur
Copy link
Member

tsteur commented Jun 18, 2019

@diosmosis seems there are still some JSlint errors. If the tests pass, we could merge this in 3.10 I suppose.

@tsteur
Copy link
Member

tsteur commented Jul 17, 2019

Merging for now, will need to fix the failing tests afterwards (newline missing at the end)

@tsteur tsteur merged commit 4596f59 into matomo-org:3.x-dev Jul 17, 2019
@MichaelRoosz MichaelRoosz deleted the post_cookie_fix branch October 29, 2023 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Review PRs that need a code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants