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

Fix type mismatch in tracker #17252

Merged
merged 1 commit into from Feb 23, 2021

Conversation

gtbl2012
Copy link
Contributor

@gtbl2012 gtbl2012 commented Feb 23, 2021

Description:

In current piwik tracker, the 'setUserId' using 'isNumberOrHasLength' to check the 'userId'.

this.setUserId = function (userId) {
    if (isNumberOrHasLength(userId)) {
        configUserId = userId;
    }
};

while the 'getRequest' function using '(configUserId && configUserId.length)' to check the 'userId'.

((configUserId && configUserId.length) ? '&uid=' + encodeWrapper(configUserId) : '')

Which causing user can set a userId in number and verify it by 'getUserId' func, but the userId cannot be reported.

This PR is to solve this confusing thing.

Review

  • Functional review done
  • Usability review done (is anything maybe unclear or think about anything that would cause people to reach out to support)
  • Security review done see checklist
  • 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

@diosmosis diosmosis added this to the 4.3.0 milestone Feb 23, 2021
@diosmosis
Copy link
Member

Hi @gtbl2012, thanks for the great first contribution! This is indeed a problem, thanks for the fix!

@diosmosis diosmosis merged commit 3f17a04 into matomo-org:4.x-dev Feb 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants