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

Set the _pk_id in the past when deleting cookie #18905

Merged
merged 2 commits into from Mar 10, 2022

Conversation

aleksijohansson
Copy link
Contributor

Description:

Fixes: #18902

Sets the expiration date of the cookies being deleted to 36 hours in the past. There can be 26 hours difference between timezones, so 36 could be a safe bet to make sure the cookies always get deleted immediately. Previously the cookie expiration was only set to ~86 seconds in the past.

The existing OptOutForm UI test should be sufficient for validating this change.

Review

@aleksijohansson aleksijohansson marked this pull request as ready for review March 9, 2022 07:20
@justinvelluppillai
Copy link
Contributor

86400 is a suspicious number of milliseconds. Sounds like it was meant to be 24 hours.

@aleksijohansson
Copy link
Contributor Author

The build failures (4 out of 12 jobs failing) on specific PHP environments seem to not be related to this change. The only failing test (test_piwikJs_minified_isUpToDate) that seems it could be related only appears on 2 of the failing jobs and does not appear on the other 10 which suggests that it is also not directly related to this change.

@aleksijohansson
Copy link
Contributor Author

@justinvelluppillai indeed it could be that it was meant to be 24 hours originally since 86400 is the number of seconds (not milliseconds) in 24 hours.

@sgiehl
Copy link
Member

sgiehl commented Mar 9, 2022

The only failing test (test_piwikJs_minified_isUpToDate) that seems it could be related

@aleksijohansson Changing the piwik.js requires to rebuild the minified versions of that file. Details how to do that can be found here: https://github.com/matomo-org/matomo/blob/4.x-dev/js/README.md#deployment

@aleksijohansson
Copy link
Contributor Author

@sgiehl I looked into that earlier, but since only two environments were failing on this issue I wasn't sure if this really needs to be done manually or if the test suite would include this minifying. Thanks for the confirmation that it needs to be done manually!

@aleksijohansson
Copy link
Contributor Author

The build failures (3 out of 12 jobs failing) on specific PHP environments seem to not be related to this change.

@sgiehl sgiehl added this to the 4.9.0 milestone Mar 10, 2022
@sgiehl sgiehl added the not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. label Mar 10, 2022
@sgiehl
Copy link
Member

sgiehl commented Mar 10, 2022

@aleksijohansson Yes those tests are unrelated. Thanks for pushing the minified JS. And we actually have an action that can update the minified JS, but that one doesn't work for pull requests coming from a fork.

@sgiehl sgiehl merged commit 05082ab into matomo-org:4.x-dev Mar 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Set the _pk_id in the past when deleting cookie.
3 participants