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

Regression: columns query parameter is never urldecoded in PHP so it cannot be encoded in JS. #8905

Merged
merged 1 commit into from Oct 4, 2015

Conversation

diosmosis
Copy link
Member

When the &columns= query parameter is supplied in the URL fragment the history angular service will encode the parameter. In PHP, however, Piwik will never decode the parameter, so values like:

nb_visits%2Cnb_actions

will be interpreted incorrectly.

We can't change Common::getRequestVar to url decode for 2.15 in order to maintain BC, so this change makes sure columns is not url encoded when being detected in the history service.

@diosmosis diosmosis added not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. Regression Indicates a feature used to work in a certain way but it no longer does even though it should. labels Oct 4, 2015
@diosmosis diosmosis added this to the 2.15.0 milestone Oct 4, 2015
diosmosis added a commit that referenced this pull request Oct 4, 2015
Regression: columns query parameter is never urldecoded in PHP so it cannot be encoded in JS.
@diosmosis diosmosis merged commit a184186 into master Oct 4, 2015
@diosmosis diosmosis deleted the columns_param_regression branch October 4, 2015 11:23
diosmosis pushed a commit that referenced this pull request Oct 4, 2015
@@ -67,7 +67,12 @@
searchObject[name] = searchObject[name][searchObject[name].length - 1];
}

searchString.push(name + '=' + encodeURIComponent(searchObject[name]));
var value = searchObject[name];
if (name != 'columns') { // the columns query parameter is not urldecoded in PHP code. TODO: this should be fixed in 3.0
Copy link
Member

Choose a reason for hiding this comment

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

@diosmosis maybe you can create follow up issue for 3.0.0 and, ideally, a pull request while this is fresh in your mind? :-)

Copy link
Member Author

Choose a reason for hiding this comment

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

Won't master be merged w/ 3.0?

Copy link
Member

Choose a reason for hiding this comment

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

Yes it will be merged, after this merge we need to remove this TODO, that's hwy we need an issue for this or we will forget and not do it

Copy link
Member Author

Choose a reason for hiding this comment

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

Actually, that comment is incorrect, something is double encoding it, I'll have to take another look.

Copy link
Member Author

Choose a reason for hiding this comment

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

Created an issue: #8928

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. Regression Indicates a feature used to work in a certain way but it no longer does even though it should.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants