Skip to content

Commit 4573aeb

Browse files
author
Benjamin Pick
committed
check if url is considered safe by wordpress
1 parent 8720306 commit 4573aeb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/test-updater.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,4 +67,8 @@ function testUpdateWithTestFile() {
6767
$this->assertUpdateWorks();
6868
}
6969

70+
function testUrlConsideredSafe() {
71+
$url = 'https://mm-prod-geoip-databases.a2649acb697e2c09b632799562c076f2.r2.cloudflarestorage.com/bla.tar.gz';
72+
$this->assertSame(wp_http_validate_url($url), $url, 'URL ' . $url . ' is not considered safe by wordpress, update of Maxmind data will fail');
73+
}
7074
}

0 commit comments

Comments
 (0)