Skip to content

Commit

Permalink
Merge pull request #135 from matomo-org/fix-download-url-lookup
Browse files Browse the repository at this point in the history
Updated path used to look up the download URL
  • Loading branch information
snake14 authored Dec 10, 2024
2 parents 08bc9ec + 3b3596a commit 99ec0e5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions BlockedIpRanges/Azure.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ public function getDownloadUrl()
// The api itself we don't really want to use. We'd need a subscriptionId. Unless we fetch it on a matomo server and make it available through a JSON there but then not sure if we are allowed to do that
// or can we get it differently? Like do they have a fixed URL or so?
// seems we could maybe assume the URL always stays the same except for the date part but then we'd need to check which date works (I've seen older URLs with same strucutre only date different)
// might be easiest to fetch "confirmation" page and then extract the URL from there?
// might be easiest to fetch "details" page and then extract the URL from there?
// should look like 'https://download.microsoft.com/download/7/1/D/71D86715-5596-4529-9B13-DA13A5DE5B63/ServiceTags_Public_20201207.json'

$contentDownloadPage = Http::sendHttpRequest('https://www.microsoft.com/en-us/download/confirmation.aspx?id=56519', 120);
$contentDownloadPage = Http::sendHttpRequest('https://www.microsoft.com/en-us/download/details.aspx?id=56519', 120);
$prefixUrl = 'href="';
$prefixStrLen = mb_strlen($prefixUrl, 'UTF-8');
$posStart = mb_strpos($contentDownloadPage, $prefixUrl . 'https://download.microsoft.com/download/', 0, 'UTF-8');
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
## Changelog

# 5.0.6 - 2024-12-09
- Fixed broken Azure link for looking up IP ranges

# 5.0.5 - 2024-10-24
- Look for headless browser in clientHints to detect spam

Expand Down
2 changes: 1 addition & 1 deletion plugin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "TrackingSpamPrevention",
"description": "This plugin offers various options to prevent spammers and bots from making your data inaccurate so you can rely on your data again.",
"version": "5.0.5",
"version": "5.0.6",
"theme": false,
"require": {
"matomo": ">=5.0.0-b1,<6.0.0-b1"
Expand Down

0 comments on commit 99ec0e5

Please sign in to comment.