Skip to content

Commit

Permalink
Merge pull request #41 from matomo-org/revert-40-revert-39-requiretoken
Browse files Browse the repository at this point in the history
Revert "Revert "Custom IP should be only sent when token is specified, otherwise the request fails""
  • Loading branch information
diosmosis authored Dec 14, 2018
2 parents 85f01cd + 0021ee1 commit 96d9daf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion PiwikTracker.php
Original file line number Diff line number Diff line change
Expand Up @@ -1687,7 +1687,7 @@ protected function getRequest($idSite)
(!empty($_GET['KEY']) ? '&KEY=' . @urlencode($_GET['KEY']) : '') .

// Only allowed for Admin/Super User, token_auth required,
(!empty($this->ip) ? '&cip=' . $this->ip : '') .
((!empty($this->ip) && !empty($this->token_auth)) ? '&cip=' . $this->ip : '') .
(!empty($this->userId) ? '&uid=' . urlencode($this->userId) : '') .
(!empty($this->forcedDatetime) ? '&cdt=' . urlencode($this->forcedDatetime) : '') .
(!empty($this->forcedNewVisit) ? '&new_visit=1' : '') .
Expand Down

0 comments on commit 96d9daf

Please sign in to comment.