matomo
matomo copied to clipboard
[js]Update * to originHost
Description:
Fixes: #19358
Only fix apply issue 1 fixes. update * to originHost
. It seems e.origin contain protocol already.
Review
- [ ] Functional review done
- [ ] Potential edge cases thought about (behavior of the code with strange input, with strange internal state or possible interactions with other Matomo subsystems)
- [ ] Usability review done (is anything maybe unclear or think about anything that would cause people to reach out to support)
- [ ] Security review done
- [ ] Wording review done
- [ ] Code review done
- [ ] Tests were added if useful/possible
- [ ] Reviewed for breaking changes
- [ ] Developer changelog updated if needed
- [ ] Documentation added if needed
- [ ] Existing documentation updated if needed
build js
The code changes are looking ok. @peterhashair what exactly did you do to test the changes locally? I did not yet have a look for what exactly the changed code is used, would be helpful if you could provide some insights, so I don't need to spent too much time to find some code that allows testing it.
ping @peterhashair this is waiting for your reply to @sgiehl to help him review this effectively.
@sgiehl @justinvelluppillai ops, sorry, I think there is js test for it, which is that one. https://github.com/matomo-org/matomo/blob/a8dec66081fa5cd671a668ef248c36e9d3285ffc/tests/javascript/index.php#L5219
But to tests locally. I add this to my
addEventListener('load', (event) => {
const targetFrame = window.top.frames[0];
const targetOrigin = 'https://yourtrackingsite';
targetFrame.postMessage('{"d":"hello there","maq_initial_value":true}', targetOrigin);
});
@peterhashair the PR contains two added files, that shouldn't exist.
@sgiehl ops, that was accidentally added, removed.