Skip to content

Conversation

@tsteur
Copy link
Member

@tsteur tsteur commented Apr 16, 2018

This fixes an issue that when changing for example the date, suddenly the log in screen is shown.

For example in a plugin I do

var tokenAuth = piwikUrl.getSearchParam('token_auth')

Which then sets indirectly $search.token_auth='' which then results in &token_auth=undefined in the URL. Meaning it will try to authenticate the user for the token undefined which won't work. Also I think in general we should not append the URL accidentally ever to the URL in the browser.

Ideally, the getSearchParam() method should certainly not set a value indirectly here and it is a bug but not sure what side effects we would run into by removing the search[paramName] = paramUrlValue;

See DEV-1316

This fixes an issue that when changing for example the date, suddenly the log in screen is shown.

For example in a plugin I do

`var tokenAuth = piwikUrl.getSearchParam('token_auth')`

Which then sets indirectly `$search.token_auth=''` which then results in `&token_auth=undefined` in the URL. Meaning it will try to authenticate the user for the token `undefined` which won't work. Also I think in general we should not append the URL accidentally ever to the URL in the browser. 

Ideally, the `getSearchParam()` method should certainly not set a value indirectly here and it is a bug but not sure what side effects we would run into by removing the `search[paramName] = paramUrlValue;`

See DEV-1316
@tsteur tsteur added the Needs Review PRs that need a code review label Apr 16, 2018
@tsteur tsteur added this to the 3.5.0 milestone Apr 16, 2018
@mattab mattab merged commit eff059c into 3.x-dev Apr 23, 2018
@mattab mattab deleted the getsearchparam branch April 23, 2018 04:09
InfinityVoid pushed a commit to InfinityVoid/matomo that referenced this pull request Oct 11, 2018
…rg#12728)

This fixes an issue that when changing for example the date, suddenly the log in screen is shown.

For example in a plugin I do

`var tokenAuth = piwikUrl.getSearchParam('token_auth')`

Which then sets indirectly `$search.token_auth=''` which then results in `&token_auth=undefined` in the URL. Meaning it will try to authenticate the user for the token `undefined` which won't work. Also I think in general we should not append the URL accidentally ever to the URL in the browser. 

Ideally, the `getSearchParam()` method should certainly not set a value indirectly here and it is a bug but not sure what side effects we would run into by removing the `search[paramName] = paramUrlValue;`

See DEV-1316
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

Development

Successfully merging this pull request may close these issues.

2 participants