Navigation Menu

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

Percent symbol fails JavaScript matomo code #16464

Closed
gnomeby opened this issue Sep 23, 2020 · 4 comments · Fixed by #16469
Closed

Percent symbol fails JavaScript matomo code #16464

gnomeby opened this issue Sep 23, 2020 · 4 comments · Fixed by #16469
Assignees
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Milestone

Comments

@gnomeby
Copy link

gnomeby commented Sep 23, 2020

If I use encoded percent symbol in campaign name:
?pk_campaign=qwerty2%25-
It generates error in matomo.js:


matomo.js:26 Uncaught URIError: URI malformed
    at decodeURIComponent (<anonymous>)
    at f (matomo.js:26)
    at ct (matomo.js:51)
    at b0 (matomo.js:54)
    at matomo.js:70
    at ch (matomo.js:59)
    at Q.trackPageView (matomo.js:70)
    at af (matomo.js:23)
    at ad (matomo.js:74)
    at Object.addTracker (matomo.js:76)
@tsteur
Copy link
Member

tsteur commented Sep 23, 2020

Hi @gnomeby thanks for creating this issue. I can't reproduce this so far. Which browser is this and are you using the latest version of Matomo? So the URL otherwise looks like https://yourdomain/test.html?pk_campaign=qwerty2%25-

@tsteur tsteur added the Can't reproduce (yet) For issues that are reported by several people, but can't be reproduced reliably and need more data label Sep 23, 2020
@gnomeby
Copy link
Author

gnomeby commented Sep 24, 2020

Hello.

I'm using Google Chrome 85.0.4183.121 and the following URL:
https://matomo.org/product-features/?pk_campaign=qwerty2%25-

@gnomeby
Copy link
Author

gnomeby commented Sep 24, 2020

@Findus23 Findus23 added Bug For errors / faults / flaws / inconsistencies etc. and removed Can't reproduce (yet) For issues that are reported by several people, but can't be reproduced reliably and need more data labels Sep 24, 2020
tsteur added a commit that referenced this issue Sep 24, 2020
fix #16464

eg `https://matomo.org/product-features/?pk_campaign=qwerty2%25-`
results in `results[1] = 'qwerty2%-` which then fails using decodeWrapper but works using safeDecodeWrapper as it falls back to unescape.
@tsteur
Copy link
Member

tsteur commented Sep 24, 2020

Thanks @gnomeby I can reproduce it there and created a patch: #16469

@tsteur tsteur added this to the 4.0.0 RC milestone Sep 24, 2020
@tsteur tsteur self-assigned this Sep 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants